Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Sidebars & Widgets »

How change link color in sidebar?


  #1  
Old Aug 22, 2009, 10:58 PM
Spaceboy
 
7 posts · Mar 2009
Hi,

I have a 2-column theme with the right sidebar containing the links to my categories, tags, etc. How can I change the link color on the right sidebar? Right now, it's the same color as the entire site and I'd like it to be different.

Thanks!
  #2  
Old Aug 22, 2009, 11:33 PM
LindaMuller's Avatar
LindaMuller
 
10 posts · Aug 2009
Smethport, Pennsylvania
Here is what I used on my site for the left and right columns. You can change the hex codes, etc., to fit your website.

Put it in the "Add HTML/CSS Inserts" section of the theme options page.

Note -- this is not PHP code.

PHP Code:

/* SIDEBAR LINKS */

/* LEFT Column */

td#left a:link,
td#left a:active,
td#left a:visited {
color#7B5B42;
font-weightbold;
font-size0.8em;
}

td#left a:hover {
color#790828;
font-weightbold;
font-size0.8em;
border-bottom1px dotted #777777;
}

/* RIGHT Column */

td#right a:link,
td#right a:active,
td#right a:visited {
color#7B5B42;
font-weightbold;
font-size0.8em;
}

td#right a:hover {
color#790828;
font-weightbold;
font-size0.8em;
border-bottom1px dotted #777777;

  #3  
Old Aug 23, 2009, 09:26 AM
Spaceboy
 
7 posts · Mar 2009
Thanks for that. It does seem to change the font/color when hovering, but that's it.

The site in question is http://www.mommarkettrends.com

Is there a mistake in that above code or do I need to add something else in order to get my specific site to change?

Thanks!
  #4  
Old Aug 23, 2009, 12:21 PM
LindaMuller's Avatar
LindaMuller
 
10 posts · Aug 2009
Smethport, Pennsylvania
Quote:
Originally Posted by Spaceboy
Thanks for that. It does seem to change the font/color when hovering, but that's it.

The site in question is http://www.mommarkettrends.com

Is there a mistake in that above code or do I need to add something else in order to get my specific site to change?

Thanks!
Looks like you have some other CSS configuring your links such as font size, etc.

Copy and paste the code you used so I can look at it. Also, send me the link font size and hex code for the colors you want to use for link and hover.
  #5  
Old Aug 23, 2009, 01:50 PM
Spaceboy
 
7 posts · Mar 2009
The only code I have pasted there for now is this:

Code:
PHP:
---------

/* SIDEBAR LINKS */

/* RIGHT Column */

td#right a:link,
td#right a:active,
td#right a:visited {
color: #7B5B42;
font-weight: bold;
font-size: 0.8em;
}

td#right a:hover {
color: #790828;
font-weight: bold;
font-size: 0.8em;
border-bottom: 1px dotted #777777;
}
---------
I am not sure what colors I want to use yet, I want to play around until I find one that I like, but I'm leaning towards a pink/roseish color.

I haven't put anything else other than that code above into that custom CSS Inserts section. The color and style of those links seems to be set from the default settings for the posts that I set in the theme.
  #6  
Old Aug 23, 2009, 04:08 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Add !important after a rule to ensure it can overwrite any existing rule, such as

td#right a:link,
td#right a:active,
td#right a:visited {
color: #7B5B42 !important;
font-weight: bold !important;
font-size: 0.8em !important;
}

This is a quick and dirty way without having to figure out which higher priority CSS rule is preventing your rule from being applied. Higher priority would mean the existing rule also uses an ID in the selector but additionally it is also more specific (selector is closer to the link)
  #7  
Old Aug 23, 2009, 05:25 PM
LindaMuller's Avatar
LindaMuller
 
10 posts · Aug 2009
Smethport, Pennsylvania
Quote:
Originally Posted by Flynn
Add !important after a rule to ensure it can overwrite any existing rule
Wow. That is a great tip. It will save so much time combing through css. Thank you.
  #8  
Old Aug 23, 2009, 07:43 PM
Spaceboy
 
7 posts · Mar 2009
Quote:
Originally Posted by Flynn
Add !important after a rule to ensure it can overwrite any existing rule, such as

td#right a:link,
td#right a:active,
td#right a:visited {
color: #7B5B42 !important;
font-weight: bold !important;
font-size: 0.8em !important;
}

This is a quick and dirty way without having to figure out which higher priority CSS rule is preventing your rule from being applied. Higher priority would mean the existing rule also uses an ID in the selector but additionally it is also more specific (selector is closer to the link)
This is exactly what I have posted in the CSS Inserts section, and still it only works with the hover links:

Code:
PHP:

/* RIGHT Column */

td#right a:link,
td#right a:active,
td#right a:visited {
color: #FFFFFF !important;
font-weight: bold !important;
font-size: 0.8em !important;
}

td#right a:hover {
color: #790828;
font-weight: bold;
font-size: 0.8em;
border-bottom: 1px dotted #777777;
}
---------
Any ideas?
  #9  
Old Aug 24, 2009, 07:34 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Then the existing rule may also have important and is more specific too. Try making your CSS more targeted as well

td#right div.widget ul li a:hover {
...
}

or even

td#right div#id-of-widget1 ul li a:hover,
td#right div#id-of-widget2 ul li a:hover,
td#right div#id-of-widget3 ul li a:hover {
...
}

or post a URL
  #10  
Old Nov 5, 2009, 06:23 PM
CasTex
 
4 posts · Nov 2009
Thanks . And I suggest to use all of styles from a css file. For example, if you use <div style="color: #efefef; font-size: 12px;">Bla bla</div>, that uses much more bandwith. Regards.

Last edited by CasTex; Nov 6, 2009 at 07:52 AM.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reply link changing color neocratus Comments, trackbacks & pings 3 Jul 11, 2010 01:49 PM
Post visited link color dmtompki Post-Kicker, -Byline & -Footer 8 Dec 22, 2009 04:08 AM
Trying to change link color on one page lilkush RSS, Feeds & Subscribing 2 Aug 11, 2009 03:02 PM
Mailpress: change post link color...can't figgure this out. d_random Sidebars & Widgets 3 Jun 10, 2009 10:11 AM
How to change color of items in sidebar? aliferste Sidebars & Widgets 1 Feb 13, 2009 12:50 PM


All times are GMT -6. The time now is 03:35 PM.


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