Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

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

How change link color in sidebar?


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Aug 22, 2009, 11: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 23, 2009, 12:33 AM
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, 10: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, 01: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, 02: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, 05:08 PM
Flynn's Avatar
Flynn
 
3,766 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, 06: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, 08: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, 08:34 AM
Flynn's Avatar
Flynn
 
3,766 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, 07: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 08: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 02:49 PM
Post visited link color dmtompki Post-Kicker, -Byline & -Footer 8 Dec 22, 2009 05:08 AM
Trying to change link color on one page lilkush RSS, Feeds & Subscribing 2 Aug 11, 2009 04:02 PM
Mailpress: change post link color...can't figgure this out. d_random Sidebars & Widgets 3 Jun 10, 2009 11:11 AM
How to change color of items in sidebar? aliferste Sidebars & Widgets 1 Feb 13, 2009 01:50 PM


All times are GMT -6. The time now is 05:43 AM.


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