Text decoration on nav menu
-
Hi. Love the theme, thanks.
I want hyperlinks within the post text to be underlined, but I don’t want headings or the nav menu to have underlines. What is the best way to achieve this?
I have entered “underline” in the Graphene Options, Text Style Options, Link text, Text Decoration field – which underlines all hyperlinks. I then added the following in the Custom CSS field
h2.post-title a, h2.post-title a:visited{
text-decoration: none;
}But I can’t find where to set it for nav menu – I’ve tried putting text-decoration: none; in lots of places, but to no effect.
Is it best to turn it off for headings, or can I set underlines just for the post content?
Site is http://www.loransheart.com
Thank you for your help.
Michelle
For the nav menu, use this in your child or custom css:
#header-menu > li > a {
text-decoration: none;
}To control certain texts having different base and hover colors, you need to use a class in your stylesheet. So, for example, the following code would be inserted into your child or custom css:
a.test {
color: #000000;
}
a.test:hover {
color: #666666;
}and then you would use a tag like this to “wrap” the text you want as the link:
<a class="test" href="YOUR LINK HERE">YOUR TEXT HERE</a>
NOTE, how we added the “class” attribute. You can change the colors in the css I provided to anything you like.
ModOr, you can do it like this:
.entry a, .entry a:visited, .entry a:hover, .entry a:active {style info;}
Since each post is in a
div
withclass=entry
, this bit of css tells the browser to style every instance of an anchor within that.entry
class in a particular way. No need to mess with Graphene text-decoration options, or to add a class to every link in every post.I love it!! Thanks for the tip Ken.
Viewing 7 posts - 1 through 7 (of 7 total)
- You must be logged in to reply to this topic.