View Full Version : CSS horizontal menu problem

09-19-2006, 08:17 PM

I tried to create a horizontal menu for a website. The problem is that i can't get it to listen to my pixel size. I need a menu that consists out of 7 items, seperated by 3px whitespace. The first and last item are 111px, the rest 112px.

is this possible in css and if so how? i am allready getting crazy from trying.

I know it has something to do with creating a list but then the problem is that i can only use padding: ..EM for setting up the size and that is not my idea. I also know that it is easy to solve with a table, but i refuse to use it for layout.

please help

Greetz kevin

09-20-2006, 12:40 AM
something like:

<html lang="en">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<style type="text/css">
* {
padding: 0;
margin: 0;
body {
background: #666;
ul {
list-style: none;
li {
float: left;
li a {
width: 112px;
display: block;
text-align: center;
margin: 0 3px;
background: #ffc;
li a.firstlast {
width: 111px;
<li><a href="" class="firstlast">link</a></li>
<li><a href="">link</a></li>
<li><a href="">link</a></li>
<li><a href="">link</a></li>
<li><a href="">link</a></li>
<li><a href="">link</a></li>
<li><a href="" class="firstlast">link</a></li>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum