Navigate
Sponsors
|
Menu Rollover Effect using tablesIntroductionAs a follow-on from Menu Rollover Effect with HTML Lists this tutorial shows you how to create the same rollover effect using tables instead of lists. Tested in Create the linksFirst we create the links. Each link is contained in a table cell, the entire table is nested in a DIV which I will explain later. We assign the same class to both the table and the div.
<div class="menu"> The result is (centered for presentation): Ok, not so pretty so now we specify styles for these. For the table (.menu) we specify the following:
table.menu a { Result: The outer div "div.menu a" is where we specify our base styles and it also acts as a workaround for crappy NS4x which does not like borders on links. Told you we need it!
div.menu a { We then specify the link colours including the hover styles which creates our highlight effect:
div.menu a:link { And the result? IE can be a little slow changing styles on links so we have to specify the following for the outer div:
div.menu ( Thats it! Go to the HTML List version... How to add an IE transition effect... |