Web design
Guido van Loon
Calendar
| February '12 | ||||||
| Mo | Tu | We | Th | Fr | Sa | Su |
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | ||||
Tag Cloud
Technorati
Yes that's right! The :hover style normally only works with <a> tags in IE while it should work for any other element as well. Other browsers like FireFox did a better job supporting this but since the majority is using IE we're stuck with a broken :hover implementation.
There is a cure however. A pretty smart piece of javascript by Peter Nederlof fixes this particular problem very elegant. He created a behavior for IE which can read your stylesheets and attach onmouseover and onmouseout events to the HTML elements that needs them to enable the :hover effect.
To enable the :hover style for almost any element in IE, all you would have to do is to attach the behaviour the the body element in your stylesheet like this:
For a full explanation and the behavior code turn to Peter Nederlof's site: Whatever:hover
This is a real Gem!
First let me explain what table based layout is all about. Before the era of Netscape and Internet explorer version 4 we already used tables to create complex layouts for our web sites. We use tables to create separate containers (cells) that allow us to place our content exactly where we want it. Best of all we could stretch these cells to fill up the available space so that everything is aligned nicely.
E.g. tables allow us to have a small column on the left with the site’s navigation links while the main content is in a second column taking up the rest of the screen. Perhaps you used to add a row above these two columns spanning them both to show the site’s title and a banner.
I do a lot of web applications which, basically, use this kind of layout. And I used to do this with tables, just the way as you are probably still doing, not realizing that there are better, more efficient, cleaner ways to do it. A friend opened my eyes a few years back and for that I am thankful. Now let me open your eyes so you can be thankful to me ![]()
| February '12 | ||||||
| Mo | Tu | We | Th | Fr | Sa | Su |
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | ||||