navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

hover over div tag

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets >> hover over div tag
Page: [1]
 
seth

 

Posts: 312
From: canada
Status: offline

 
hover over div tag - 8/1/2007 18:36:38   
Hi i have a div with a class called "beenThere"
I trying to set a style for the class, and also set a different style for a hover effect, this is what i have so far, any suggestions, thanks!

in the css i have:

.beenThere {
OVERFLOW: visible;
cursor:hand;
}

.beenThere.a:link:hover, a:visited:hover {text-decoration: underline; color: red; background: yellow}
Tailslide

 

Posts: 5915
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: hover over div tag - 8/2/2007 3:42:52   
This is easy peasy for modern browsers (even IE7 can manage it!) but IE6 and under will only do hover effects on links. But there's a way around it with a little scripting help.

Had a bit of time this morning so put a test together for you:

http://www.littleblueplane.com/test/hoverdivtest.html

This includes the normal markup and CSS which will give the div a hover effect in all modern browsers plus IE7. It also includes a conditional comment which feeds a script known as whatever:hover to IE6 and under.

You can get the most up to date version of the csshover.htc script here: http://www.xs4all.nl/~peterned/csshover.html

Anyway - what it amounts to for the modern browsers is this:

.hoverdiv:hover {background-color:pink;}


Then again you don't have to bother adding all the IE6 < stuff if you don't fancy.

< Message edited by Tailslide -- 8/2/2007 4:03:19 >


_____________________________

"My strategy is so simple an idiot could have devised it"
Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project

(in reply to Tailslide)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> hover over div tag
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts