- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 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.
Hi,
I know this is old discussion, but this is different case.
Im trying to highlight categories/tags buttons (placed on left) on this site http://www.deluxetemplates.net/ when category/tag is active, same as hover.
I created a HTML code for those categories/tags, so Im not getting how to highlight those, to do with CSS (which I tried and was unlucky or PHP ?)
I also, would like to highlight tags when post is active/open (this is less important).
Any suggestion is welcome.
Thanks
klo
Normally, WordPress should give your body tag certain classes. I think (not entirely sure) that the category name and tag names are in those classes. If so, then you can say this in the CSS:
li.tag1 {
}
body.tag1 li.tag1 {
}
thanks for reply, I did it, but didn’t worked for me
here css for one tag only
body.blogger-travel li.blogger-travel {
background: url(“images/img-all.png”) no-repeat scroll 0 -311px transparent;
color: #000000;
}
here HTML
for this tag only
http://www.deluxetemplates.net/tag/travel-blogger-templates
what I’m doing wrong ?
Bizarrely, the body has no classes. Usually WordPress gives it a load of classes.
try changing the body tag to this:
>
Then open the web-page, and inspect the element. Look at what the body’s id and classes are, and change the code above from
body.blogger-travel
to
body.
or
body#
yes, now its working, thank you.