Home › Forums › CSS › CSS Hierarchy Confusion › Re: CSS Hierarchy Confusion
January 7, 2011 at 6:28 pm
#67174
noahgelman
Participant
Say for example the style in question is a border. You have it set up something like this:
.entry img {
border:1px solid #F00
}
Now, if on a specific page you dont want the images in .entry to have a border then what you would do is add a class or id to the body tag at the top of the page. For example, go from:
to:
“about” could be whatever you want. Name it something relative to the page. Anyway. Back in the css you add:
.entry img {
border:1px solid #F00
}
#about .entry img {
border:none;
}
That way, on the page with the id of “about” (or whatever you want to call it), the images inside .entry would have no border.