![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Check it out here: http://www.amazon.com pass your mouse over the top tab "SEE ALL 31 Product Categories" and see the nice menu. Is there a way to do it easily with CSS? I checked out the code, and it's huge, and it uses JavaScript. I think it's basically 5 states: 1. Mouse over the tab 2. Fast transparent DIV with 50% width and height and an outline for nice transition 3. Menu with all categories 4. On mouse out, again, fast transparent DIV with 50% width and height and an outline for nice transition 5. End I think it can work without the DOM on regular browsers, but it won't on IE because the :hover pseudo class can be applied only to A tags. Maybe there is a tutorial somewhere on the Internet... |
#3
| |||
| |||
|
|
Actually, there is a way to get IE to recognize the :hover psuedo-class. (NOTE: I don't think I'm seeing the same amazon page as you, so I'm not sure exactly what you're looking at...) |
|
See this page for an explanation: http://www.xs4all.nl/~peterned/csshover.html I used the code provided here: view-source:http://www.xs4all.nl/~peterned/htc/csshover.htc for page on my site in order to get IE to use :hover on p elements: http://roth-sisley.net/DaveStuff/index.html [warning: the server is off at night (California time).] I'll admit I don't understand exactly how it works, but by using it, IE6 displays my page the same way firefox does. The one drawback is I get an error when I validate the css: "Property behavior doesn't exist : url(hover.htc)" (ha ha). Perhaps you could use something similar and avoid the javascript. |
#4
| |||
| |||
|
|
"Dave Sisley" <dsisley (AT) sonic (DOT) net> wrote in message news:xNXAd.15468$_3.179005 (AT) typhoon (DOT) sonic.net... Actually, there is a way to get IE to recognize the :hover psuedo-class. (NOTE: I don't think I'm seeing the same amazon page as you, so I'm not sure exactly what you're looking at...) It doesn't get IE to recognize :hover. It goes through all the styles on the page and *replaces* (some of) the ones that include :hover with a class name that IE *will* recognize. |
| See this page for an explanation: http://www.xs4all.nl/~peterned/csshover.html I used the code provided here: view-source:http://www.xs4all.nl/~peterned/htc/csshover.htc for page on my site in order to get IE to use :hover on p elements: http://roth-sisley.net/DaveStuff/index.html [warning: the server is off at night (California time).] I'll admit I don't understand exactly how it works, but by using it, IE6 displays my page the same way firefox does. The one drawback is I get an error when I validate the css: "Property behavior doesn't exist : url(hover.htc)" (ha ha). Perhaps you could use something similar and avoid the javascript. It doesn't avoid Javascript. That's what csshover.htc is coded in. No Javascript, no behaviors. |
#5
| |||
| |||
|
|
Harlan Messinger <h.messinger (AT) comcast (DOT) net> wrote: It doesn't avoid Javascript. That's what csshover.htc is coded in. No Javascript, no behaviors. Thanks again. I don't know javascript, which is why I try to avoid using it. I should have realized, though. I need to experiment with this little block of code on some other pages, but I like how easy it was to implement. I guess what I avoided was having to write any javascript *myself* (smiley). |
![]() |
| Thread Tools | |
| Display Modes | |
| |