For some reason my position: relative isn't working.
HTML Code:
<div id="akd">
<a href="http://www.alikat-designs.com"><img src="images/akd.png" alt="Brought to you by AliKat Designs"/></a>
</div>
<div id="menu">
<div><a id="h" class="normal" href="">Home</a></div>
<div><a id="ab" class="hover" href="">About</a></div>
<div><a id="ar" class="normal" href="">Archives</a></div>
<div><a id="l" class="normal" href="">Resources</a></div>
<div><a id="c" class="normal" href="">Contact</a></div>
<div><a id="f" class="normal" href="">Forums</a></div>
<br class="clear"/>
</div>
Code:
#menu { width: 961px; }
#menu div { display: inline; float: left; }
#menu a { display: block; width: 140px; padding: 5px 0px; margin: 0 10px; position: relative; }
#menu a { color: #ffffff; text-align: center; font-size: 1.2em; font-weight: bold; text-decoration: none; position: relative; top: 0; }
a#h { background: url("images/red_tab.png") no-repeat; }
a#ab { background: url("images/purple_tab.png") no-repeat; }
a#ar { background: url("images/green_tab.png") no-repeat; }
a#l { background: url("images/yellow_tab.png") no-repeat; color: #000000; }
a#c { background: url("images/cyan_tab.png") no-repeat; color: #000000; }
a#f { background: url("images/blue_tab.png") no-repeat; }
.normal { position: relative; top: 0; height: 20px; left: 0; }
.hover { position: relative; top: -80px; height: 40px; }
It should be moving the About link above the others by 20px but it's still inline with the others.
Attached are the complete files
Is it because it's floating? That shouldn't matter with the right positioning on the element though. Any help would be greatly appreciated.
|