Results 1 to 2 of 2

Thread: Tabbed Menu

  1. #1
    Join Date
    Oct 2005
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Tabbed Menu

    Hi folks,

    Having a problem with below. How do I get the text to be centered in each tab?

    Cheers,



    <style type="text/css">
    body {text-align: center}


    body
    {
    font-family: verdana, sans-serif;
    font-size: 13px;
    background: #f3f3f3;
    }

    #container
    {
    width: 800px;
    padding: 30px;
    border: 1px solid #ccc;
    background: #fff;
    }

    #tabnav {
    height: 16px;
    margin: 0;
    padding-left: 10px;
    background: url(/.../images/tab_bottom.gif') repeat-x bottom;
    }

    #tabnav li {
    margin: 0;
    padding: 0;
    display: inline;
    list-style-type: none;
    }

    #tabnav a:link, #tabnav a:visited {
    float: center;
    background: #f3f3f3;
    font-size: 15px;
    line-height: 25px;
    font-weight: bold;
    padding: 2px 20px 2px 10px;
    margin-right: 4px;
    border: 1px solid #ccc;
    text-decoration: none;
    color: #666;
    }

    #tabnav a:link.active, #tabnav a:visited.active {
    border-bottom: 1px solid #fff;
    background: #009;
    color: #000;
    }

    #tabnav a:hover {
    background: #006;
    }

    </style>
    </head>

    <body>

    <div id="container">

    <ul id="tabnav">
    <li><a href="#" class="active">a</a></li>
    <li><a href="#">b</a></li>
    <li><a href="#">c</a></li>
    <li><a href="#">d</a></li>
    <li><a href="#">e</a></li>
    </ul>

    </div>

    </body>
    </html>

  2. #2
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    insert the following in your tab classes.

    Code:
    text-align: center;

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •