Reply
Old 02-20-2009, 08:57 AM Hover link
Novice Talker

Posts: 8
Name: Neil Owen
Trades: 0
How do you make a hover link using CSS that works after the page has been revisited?
no1chance23 is offline
Reply With Quote
View Public Profile Visit no1chance23's homepage!
 
 
When You Register, These Ads Go Away!
Old 02-20-2009, 09:45 AM Re: Hover link
LadynRed's Avatar
Super Moderator

Posts: 9,036
Location: Tennessee
Trades: 0
Hover works any time, doesn't matter if you go somewhere else and come back.
You use the :hover pseudo-class on the <a> tag - for example;

#nav a {color: blue;}
#nav a:hover{color: red;}
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is online now
Reply With Quote
View Public Profile
 
Old 02-20-2009, 04:48 PM Re: Hover link
Defies a Status

Posts: 1,511
Trades: 0
I'm confused and I image the OP will be also.

Why the #nav ? # is a div declaration isn't it? That would make all on the page the same?
__________________
Colbyt
My Domains & Sites For Sale by Owner
colbyt is online now
Reply With Quote
View Public Profile
 
Old 02-20-2009, 06:03 PM Re: Hover link
LadynRed's Avatar
Super Moderator

Posts: 9,036
Location: Tennessee
Trades: 0
The #nav was just an example. It could be a UL with an ID of "nav" or a div with an id of #nav. Either way, specifying the containing element would limit that hover color change to just those inside of #nav.

If you want it to apply to ALL hover links, just leave out the #xxxxx designation.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is online now
Reply With Quote
View Public Profile
 
Old 02-25-2009, 08:39 AM Re: Hover link
anderswc's Avatar
Super Talker

Posts: 132
Name: Will Anderson
Location: Terre Haute, IN
Trades: 0
Also just to clarify # is an ID declaration, not a div declaration.

eg.

HTML Code:
<div id="div1">This is div 1</div>
<div id="div2">This is div 2</div>
<div id="div3">This is div 3</div>
Code:
/* This selects all three divs */
div {/*style here*/}

/* This selects only the div with ID "div1" */
#div1 {/*style here*/}
__________________
Will Anderson
It's An Anderson | Twitter | Anderson Web Solutions
anderswc is offline
Reply With Quote
View Public Profile Visit anderswc's homepage!
 
Old 02-25-2009, 09:31 AM Re: Hover link
LadynRed's Avatar
Super Moderator

Posts: 9,036
Location: Tennessee
Trades: 0
Did I say anywhere that # pertained only to divs ???
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is online now
Reply With Quote
View Public Profile
 
Reply     « Reply to Hover link
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.09407 seconds with 13 queries