- This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
AHH! I keep thinking I’m understanding this but then I get stuck again. Sorry I’m going to have to describe the problem and not use proper terminology.
Okay, so if I have an overarching style in wordpress, like “.entry img” that applies to any image within the “entry” class, but I want to make an exception for en entire page’s images (or do them individually if need be), how can I override the broad styling to make an exception? What’s the best way? I’ve got 5px padding right now and on one page I want it to be 1px.
Sorry for such a basic one, and that I don’t know the terminology well enough to search for a previous forum post.
Christopher, do you mean just putting
within the post? Or are you talking about some modification to the existing css structure of my premium theme?
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.