Welcome to WebmasterWorld Guest from 3.209.80.87

Forum Moderators: not2easy

Message Too Old, No Replies

Text Rollovers

     
2:34 pm on May 17, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 20, 2003
posts:46
votes: 0


To cut down on page load time i am using text rollovers in my nav bar on the left side of the page. The nav bar has a green background so i made the text white and the rollover change the text to yellow. This works fine but the page also has links. Those links are also white and yellow and that doesnt work because the page background is white. I use the code below in the style section of the head tags to make this work. In short a need to know how i can have links on the page but not the same color. Hope this makes since.
A { color: white; text-decoration: none }
A:hover {text-decoration:none; color:yellow}

Thanks to all that responed.

3:36 pm on May 17, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 16, 2002
posts:2139
votes: 1


Are you familiar with css (style sheets)? This is a pretty easy way to do it.

(I would ask the question over in the CSS forum and you will get a quick answer.)

3:42 pm on May 17, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 22, 2002
posts:2546
votes: 0


Yes, this one will be moved to the CSS section but the answer is easy.

Wrap the navbar in a div like so:

<div id="navbar">
>>navbar code<<
</div>

Then, in the style section:

#navbar a{rules here}
#navbar a:visited{rules here}
#navbar a:hover{rules here}

Now only the links in "navbar" will follow those rules above and the other links will follow the basic rules.

Birdman

9:02 pm on May 18, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 20, 2003
posts:46
votes: 0


Great Thanks