Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Need help centering nav bar

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #34777

    Hi, i’m new to all this, and need help centering my drop down menu….i’ve been searching google and youtube for days and can’t seem to figure it out…any help would be greatly appreciated…thanks in advance…

    here is html code:






    banner

























     





     


     

    header


    content

    Copyright © 2011 Bintang Badminton

     




    and here is css code:

    body {
    background-image: url(images/bg.png);
    background-repeat: repeat-x;
    text-align: center;
    font-family: "Space Age";

    }
    body,td,th {
    font-size: 15px;
    font-family: Verdana, Geneva, sans-serif;
    color: #FFF;
    }





    #menu {
    font:Arial, Helvetica, sans-serif;
    font-size:13px;
    height:25px;
    margin:auto;
    width:980px;
    }

    #nav li {
    list-style: none;
    padding-left:0;
    margin:auto;
    width:980px;
    }
    #nav ul li {
    margin: 0;
    padding: 0;
    }

    #nav a {
    text-decoration: none;
    color:#FFF;
    }
    /*Navagaton menu*/

    #nav {
    width: 980px;
    height: 25px;
    margin: 0 auto 0;
    font-size:14px;
    }

    #nav li {
    position: relative;
    float: left;
    width: 120px;
    height: 25px;
    line-height: 20px;
    background-color: #030;
    margin:0 auto;
    }

    #nav li a:hover {
    background-color: #0F0;
    color:black;
    }

    #nav li a {
    background-color: #030;
    display:block;
    float: left;
    width: 100%;
    height: 100%;
    }

    #nav li ul {
    display: none;
    }

    #nav li:hover ul {
    display: inline;
    float: left;
    width: 100%;
    height: 35px;
    margin: 0; padding: 0;
    text-align: left;
    background-color:#0F0

    }

    #nav li:hover ul li {
    width: 100%;
    background-color:#0F0;
    }

    #nav li ul li a {
    background-color:#030;
    padding-left:15px;
    padding-right:2px;
    padding-bottom:2px;
    padding-top:2px;
    }

    thanks again!

Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.