Reply
Link in a DIV when rolled over change background color?
Old 02-24-2008, 11:37 AM Link in a DIV when rolled over change background color?
Extreme Talker

Posts: 202
I've done this before years ago but can't quite remember how to do it.

I want a DIV with text in to become a link - the whole DIV - and when the mouse enters it the background-color changes.

If the user clicks anywhere in the DIV it will activate the link.

Thanks
[CODE
.menu1 {
float: left;
}[/code]

Code:
.menu1 a:link, .menu1 a:visited, .menu1 a:active {
    color: black;
    text-decoration: none;
    font-weight: normal;
    background-color: #006666;
}
.menu1 a:hover {
    color: #FFFFFF;
    text-decoration: underline;
    font-weight: normal;
    background-color: #000000;
}
__________________
JF Web Design
Joe3000 is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 02-24-2008, 04:34 PM Re: Link in a DIV when rolled over change background color?
chrishirst's Avatar
Super Moderator

Latest Blog Post:
Javascript alert
Posts: 13,688
Location: Blackpool. UK
a { display:block;}
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-24-2008, 05:41 PM Re: Link in a DIV when rolled over change background color?
Extreme Talker

Posts: 202
Thank you.
__________________
JF Web Design
Joe3000 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Link in a DIV when rolled over change background color?
 

Thread Tools

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

vB 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.33829 seconds with 12 queries