1
Contributor
1
Reply
2
Views
6 Years
Discussion Span
Last Post by Matt__
0

Hey guys, please can you help with this please?

how do I centre the menu-bar? http://bit.ly/pkwM0g

The menu-bar code in the body of the HTML;

<ul class="red">
    
<li><a href="#" title="home" class="current"><span>Home</span></a></li>
<li><a href="#" title="news"><span>News</span></a></li>
<li><a href="#" title="gallery"><span>Gallery</span></a></li>
<li><a href="#" title="contact"><span>Contact</span></a></li>
    
</ul>

The CSS code;

ul {

    padding: 5px;
    list-style: none;
    background-color: #fff;
    border-bottom: 1px solid #000;
    float: left;
    text-align: center;   
}

li {
    float: left;
    margin: 0 30px;
    text-align: center;
}

li a {
    text-decoration: none;
    float:left;
    color: #000;
    font: 900 14px/22px "Arial", Helvetica, sans-serif;
}

li a span {
    margin: 0 10px 0 -10px;
    padding: 1px 8px 5px 18px;
    position: relative; /*To fix IE6 problem (not displaying)*/
    float:left;
}

/*RED*/
ul.red li a:hover {
    color: #fff;
    background: url(images/red.png) no-repeat top right;
}

ul.red li a:hover span {
    background: url(images/red.png) no-repeat top left;
}

ul.red li a.current {
    background: url(images/red.png) no-repeat top right;
    color: #fff;
}

ul.red li a.current span {
    background: url(images/red.png) no-repeat top left;
}

Edited by pyTony: fixed formatting

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.