views:

17

answers:

2

Hi all, I'm trying to find all the images on a page based on their alignment (no class or id attached to these images), although I'm not sure how to do it. Basically I want to add CSS to images which are aligned to the right, yet leave the other images as they are.

If anyone could help out, that'd be great :)

+3  A: 

What about img[align="top"] ?

http://api.jquery.com/attribute-equals-selector/

Nikita Rybak
+1  A: 

Have you tried this selector?

$('img[align=right]').addClass('onRight');

or if that doesn't work, it might help if you showed us some of your HTML

fudgey
yep, works great thank you for your help. Nikita got in first with the answer though :)
SoulieBaby
So using `top` gets your right aligned images, or did I miss something?
fudgey