Forum Moderators: not2easy

Message Too Old, No Replies

Modifying anchor element effects all anchor elements

a anchor div effects all a elements

         

nabbit

1:36 pm on Aug 14, 2009 (gmt 0)

10+ Year Member



Hi,

I am using the following css to set my anchor element;

div#topmenu ul li a:link, a:visited {
text-decoration:none;
color:#adadad;
}

Now if I add padding-left:20px; all the a elements in the page is padded 20px to the left

I use HTML 4.01 Strict doctype.

Any help will be appreciated.
Thanks.

swa66

3:11 pm on Aug 14, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



div#topmenu ul li a:link, a:visited { 
text-decoration:none;
color:#adadad;
}

is the equivalent to:
div#topmenu ul li a:link{ 
text-decoration:none;
color:#adadad;
}
a:visited {
text-decoration:none;
color:#adadad;
}

guess you wanted to write:

div#topmenu ul li a:link, div#topmenu ul li a:visited { 
...

nabbit

4:48 pm on Aug 14, 2009 (gmt 0)

10+ Year Member



U guessed right.

Thanks.