Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   [SOLVED] A way to style links in headers differently from links in body text? (http://forum.bytesforall.com/showthread.php?t=20915)

dabeed Sep 15, 2013 03:22 PM

[SOLVED] A way to style links in headers differently from links in body text?
 
For example, I'd like to have links in body text be bold and blue, but I'd like the titles of blog posts (which are links) not to be blue.

I've been syling links through ATO > Body, Text, & Links > Link Default Color and Link Hover Cover, but this affects all links everywhere.

juggledad Sep 15, 2013 03:56 PM

You will need to add some CSS in the ato->add HTML/CSS Insert->CSS Inserts option to style one of the two areas differently. You could try something like
HTML Code:

#header a {color: red;

dabeed Sep 16, 2013 11:03 PM

Thank you! I tried that exact code and it works for the site/blog title (and presumably everything else that's a link in the #header). I tried

Code:

h2 a {
color: red;
}

but that didn't work (it had no effect). Any suggestions?

juggledad Sep 17, 2013 03:11 AM

there are many places in the theme options you can style links, the footer, the sidebars the links in posts. You need to go thru the various options to see what is avaiable.

However if you want all the header links one color and the rest another you could try adding this to the 'CSS Inserts' option
HTML Code:

a {color: green !important;}
#header a {color: red !important;}


dabeed Sep 18, 2013 05:03 PM

Thanks, this helped: Adding
Code:

!important;
did the trick, clearly overriding something else (I don't understand what was overridden, but it worked).

What I wanted to do was slightly different, though: I wanted to make all the h2 links a certain color. Meaning when the entire h2 is linked (as opposed to individual words), as on the blog main page, when blog post titles (h2s in my setup) are linked.

Here's the code that does that, for those who need it:
Code:

h2 a {color: black !important;}
:)


All times are GMT -6. The time now is 03:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.