|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
hover effect on div tags
hi, folks!
i'm trying to use hover effect on some div tags. but, as usual, the effect is not the same on IE as it is on FF. the true is that there is no effect at all on IE :/ i'm using something like this: Code:
.tp1:hover {
background: #069;
color: #fff;
}
hope someone help me ![]() |
|
#2
|
|||
|
|||
|
IE only allows the use of the hover tag on link elements ('a' elements). In order for IE to have the hover effect on other elements, the most used technique, i believe, is the use of javascript to write onmouseover and onmouseout attributes to the element. The onmouseover and onmouseout attributes change the styling of the element on hover essentially giving you the ability to change the style on a hover.
|
|
#3
|
|||
|
|||
|
Here's an example. The javascript is used to make IE allow hover on LI elements.
Hover Example |
|
#4
|
|||
|
|||
|
Quote:
Use "A" tag with ur defination Muhammad Abdul Mannan. http://mannan.zabvision.edu.pk |
|
#5
|
||||
|
||||
|
Or take revenge on all those frontpage website builders and slap a
"Best NOT viewed with Internet Explorer" block on your website. When will Microsoft finally implement proper CSS support?
__________________
This is my code. Is it not nifty? "The biggest problem encountered while trying to design a system that was completely foolproof, was, that people tended to underestimate the ingenuity of complete fools." ---Douglas Adams Join the Itsacon fanclub! Zero Tolerance: Spammers banned so far: 275
![]() |
|
#6
|
||||
|
||||
|
I believe they've fixed this issue on the forthcoming IE7 release, but as a web designer, it would still be good to support the workaround [as far as backwards compatability goes].
In the meantime, I guess Javascript would suit your needs... or somehow squeeze an anchor tag in there. |
|
#7
|
||||
|
||||
|
Wouldn't work.
HTML standard doesn't allow for div tags to be enclosed by a tags, and putting the a IN the div would cause only the text in the a tag to hover, which would look rather silly... |
|
#8
|
||||
|
||||
|
I'm not sure what it is exactly you're creating.
If it's a dropdown menu, have you considered using the Suckerfish Dropdown method? > Pretty Example |
|
#9
|
||||
|
||||
|
there's a lot of submenus
i don't think that suckerfish will fit but thanks for the answers, anyway, i'm using javascript now and i'm thinking about that 'best NOT viewed with Internet Explorer' ![]() |
|
#10
|
||||
|
||||
|
Quote:
Good boy.. ![]() |
|
#11
|
||||
|
||||
|
only one more question about hover effects.
ok, it works fine on firefox, but not when i put the page on a geocities server. why? maybe geocities does'nt like css too ![]() |
|
#12
|
||||
|
||||
|
Are you able to provide a link?
|
|
#13
|
||||
|
||||
|
|
|
#14
|
|||
|
|||
|
Not sure if this thread is still open, and if your question was answered.
Geocities adds a 'nice' line of JavaScript code on top of your HTML-code. This causes the <!DOCTYPE line to be the third line in stead of the first line. So the browser does not recognizes that you are using a DOCTYPE, falling back on a standard that does not support the hover.... |
|
#15
|
||||
|
||||
|
Yep, Geocities may not be the best location to park your code. =)
|
|
#16
|
|||
|