Forum Moderators: not2easy

Message Too Old, No Replies

multiple declarations.

         

topr8

4:41 pm on Dec 4, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



i have this that works fine:

#footer h3 a:hover{background-color:silver;color:red;text-decoration:none;}
#footer p a:hover{background-color:silver;color:red;text-decoration:none;}

i figured i could shorten it to:
a).
#footer p a:hover,h3 a:hover{background-color:silver;color:red;text-decoration:none;}

or
b).
#footer h3,p a:hover{background-color:silver;color:red;text-decoration:none;}

however neither of these shortened versions work as expected
a) the h3 is going background silver on hover but not color red
b) causes the background color of the h3 to be silver

any ideas?

birdbrain

4:56 pm on Dec 4, 2007 (gmt 0)



Hi there topr8,

try it like this...


#footer h3 a:hover,#footer p a:hover {
background-color:silver;
color:red;
text-decoration:none;
}

birdbrain

topr8

5:06 pm on Dec 4, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



many thanks, absolutely right!

birdbrain

5:17 pm on Dec 4, 2007 (gmt 0)



No problem, you're very welcome. ;)

rocknbil

12:10 am on Dec 5, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Did you try just #footer a:hover {}? Unless there's other anchors in #footer that you don't want to have this style, that should work too.

topr8

12:35 am on Dec 5, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



excellent thanks rocknbil

that shaved some mre of the style sheet size, i didn't know you could do that and applied it a couple of times

... actually i didn't want it to apply to all in the footer but by ordering the styles appropriately i got it working in those that i did and not in those that i didn't - cool