Forum Moderators: not2easy

Message Too Old, No Replies

setting img border for an id?

set image border for an id

         

Berf

2:09 am on Feb 27, 2005 (gmt 0)

10+ Year Member



I have a bunch of content that populates within a div tag. This tag is associsted with a CSS id. I would like to set the border property for all the images that are within the div tag, and I don't know the CSS for it. I tried a few things and it hasn't worked.

.content img{border: solid black 5px;}

img.content {border: solid black 5px;}

None of these worked. What is the syntax for something like this? Thank you in advance.

createErrorMsg

3:05 am on Feb 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If the div has the ID "content" the CSS syntax is...

#content img{
border:5px solid #000;
}

The hash mark (#) indicates an ID; the dot (.) indicates a CLASS.

Also note that the correct order for values in the border shorthand property is...

border: width style color;

cEM