Log in

View Full Version : Styling tags in only one div



lord_havoc
07-20-2007, 06:30 AM
Okay, I want the image tag in one div to float left while not to in all the rest. However I can't seem to achieve this. I know it can be done but I guess I'm doing it wrong. What is the right way to fix this?

The div is lcol. So shouldn't the CSS say:



#lcol .img{float: left}

Twey
07-20-2007, 10:48 AM
No, . is for selecting a class. To select an element type, you just use the tag name:
#lcol img {
float: left;
}