article image css targeting (SOLVED)
hey i am trying to apply some code to an image in an article depending on which alignment i have chosen.
i can traget the image using
but i cannot target the image depending where is it on the page... typolight seems to create a style and add it to it when i look at the code it has a div of
Code:
.image_container float_right
or
Code:
.image_container float_left
is there a way i can traget these in my css to add styling to them so i do not have to put in the margins each time i want to add an image to the page.
Thanks,
Ste.
Re: article image css targeting
Just add this css class to one of your stylesheets:
Code:
.float_right {
margin: 0 0 20px 20px;
}
Re: article image css targeting
Additionally to be sure to only target the images you can also use the following selector
Code:
.image_container.float_right {
/* style here */
}
Unfortunately IE6 does not understand this. That's about 20% (and dropping) of all browsers right now?
Re: article image css targeting (SOLVED)
hey,
thanks, that works great. i had put a space inbetween them which explains why it didnt work.
I checked it in all major browsers and IE6 and it seems to work fine.
Thanks again :)