[thelist] CSS Guidance

Manuel González Noriega manuel at simplelogica.net
Sun Nov 23 15:16:14 CST 2003


Gina Anderson wrote:

>I tried in the stylesheet:
>
>	img.blogbody {
>		border: 1px solid #DEDEDE;
>		padding: 4px;
>		}
>
>Obviously puts a border around ALL the images, which I don't want. Why
>doesn't img.blogbody work? Can I do this without having to put a class in
>the img src code, because I REALLY don't want to. :)
>
>  
>
Yes, you can :)

img.blogbody only selects a <img> element of class "blogbody", that you 
don't have.

What you want is a img that is inside of a div class="blogbody". The way 
to express that with a CSS rule is

div.blogbody img {

border: 1px solid #DEDEDE;
		padding: 4px;

}


Now that should work.

-- 
Manuel González Noriega
Simplelógica, construcción web @ http://simplelogica.net
Logicola es el weblog de Simplelógica http://simplelogica.net/logicola/




More information about the thelist mailing list