PDA

View Full Version : Excluding a div from a link colour setup?



LJackson
Feb 2nd, 2010, 07:54 PM
Hi,

I have set up my header div so hat all links are white which looks great, but i then relised that one of my functions was also effected and ment that i could not see the options as they were on a white background.

how do i exclude the links in this div so that i can put them back to black?

my header css is set up like so

#header a {color:#FFFFFF;}


and my css from my function which is inside my header div is

#storesearch_container{float:left;width:290px; height:35px;}
.main{width:300px;height:40px;margin-bottom:10px;}
#loading{visibility:hidden;padding-left:5px;}
#ajax_response{border:1px solid #8789e7;background:#fff;position:absolute;display:none;padding:2px 2px;top:148px; z-index:1; color:#000000;}
#holder{width:300px; float:left;}
.list{padding:0;margin:0;list-style:none;}
.list li a{text-align:left;padding:2px;cursor:pointer;display:block;text-decoration:none;color:#000;}
.selected{background:#cccff2;}
.bold{font-weight:bold;color:#131e9f;}
.about{text-align:right;font-size:10px;margin:10px 4px;}
.about a{color:#bcbcbc;text-decoration:none;}
.about a:hover{color:#575757;cursor:default;}


ive tried adding an 'a' to #storesearch_container,#ajax_response and holder but have had no luck :( any ideas

thanks
Luke

abduraooft
Feb 2nd, 2010, 08:03 PM
The CSS specificity (http://htmldog.com/guides/cssadvanced/specificity) will do the trick for you!

.about a{color:#bcbcbc;text-decoration:none;}
.about a:hover{color:#575757;cursor:default;}
Try
#header .about a{color:#bcbcbc;text-decoration:none;}
#header .about a:hover{color:#575757;cursor:default;}

LJackson
Feb 2nd, 2010, 08:09 PM
thanks mate...

added the #header to .list and .list a and it works a treat :)

cheers
Luke