Doing it with style
Getting a bit more complicated. Using a top left and top right span 'block' to chamfer the corners giving a tab effect.
See menueight_b for an unordered list version of this menu.
#container {
position:relative;
}
#menu {
text-align:center;
position:relative;
height:8em;
}
.box {
position:relative;
float:left;
top:30px;
}
#menu a, #menu a:visited {
position:relative;
text-decoration:none;
background-color:#06a;
color:#fff;
display:block;
width:70px;
height:15px;
padding:5px;
margin:0 1px;
}
#menu a .topleft, #menu a .topright {
position:absolute;
top:0;
width:0;
height:0;
overflow:hidden;
border-top:10px solid #fff;
}
#menu a .topleft {
left:0;
border-right:10px solid #06a;
}
#menu a .topright {
left:70px;
border-left:10px solid #06a;
}
#menu a:hover {
background-color:#000;
}
#menu a:hover .topleft {
border-right:10px solid #000;
border-top:10px solid #fff;
}
#menu a:hover .topright {
border-left:10px solid #000;
border-top:10px solid #fff;
}
<div id="container">
<div id="menu">
<div class="box">
<a href="#nogo">
Item 1
<span class="topleft"></span>
<span class="topright"></span>
</a>
</div>
<div class="box">
<a href="#nogo">
Item 2
<span class="topleft"></span>
<span class="topright"></span>
</a>
</div>
<div class="box">
<a href="#nogo">
Item 3
<span class="topleft"></span>
<span class="topright"></span>
</a>
</div>
<div class="box">
<a href="#nogo">
Item 4
<span class="topleft"></span>
<span class="topright"></span>
</a>
</div>
<div class="box">
<a href="#nogo">
Item 5
<span class="topleft"></span>
<span class="topright"></span>
</a>
</div>
</div>
</div>
Because of all the time and effort spent in producing this demonstration I would ask that you respect my copyright.
This demonstration can be used subject to the following terms and conditions.
Your donations keep CSS PLAY running.
If your donation is for the use of a demo then please email me with the demo url after making your donation.