Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Sep 2004
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Navigation Centering text not up top

    I am trying to center the text but it is only going to the top not center of the navigation. How do do that?

    Here is the code:

    #navcontainer
    {
    margin: 0 0 0 0;
    padding: 0;
    height: 0;

    }

    #navcontainer ul
    {
    border: 0;
    margin: 0;
    padding: 0;
    list-style-type: none;
    text-align: center;
    }

    #navcontainer ul li
    {
    display: block;
    float: left;
    text-align: center;
    padding: 0;
    margin: 0;
    }

    #navcontainer ul li a
    {
    background: #5B1A26;
    width: 125px;
    height: 40px;
    padding: 0;
    margin: 0 0 0 0;
    color: #f5d7b4;
    text-decoration: none;
    display: block;
    text-align: center ;
    font: Arial, Helvetica, sans-serif;
    }

    #navcontainer ul li a:hover
    {
    color: #FFFFFF;
    background: #442221;
    text-decoration:underline;
    }

    #navcontainer a:active
    {
    background: #442221;
    color: #fff;
    font-weight: bold;
    }

    #navcontainer li#active a
    {
    background: #442221;
    color: #fff;
    font-weight: bold;
    }
    Also look at the picture if you don't knowwhat I am talking about.

    THanks
    Attached Thumbnails Attached Thumbnails Navigation Centering text not up top-navi.jpg  

  • #2
    Regular Coder
    Join Date
    Jul 2004
    Location
    engoku no anime
    Posts
    354
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You want the text centered? Have you tried giving the container for all of the items some top padding?

    Code:
    #navcontainer ul
    {
    border: 0;
    margin: 0;
    padding: 20px 0 0;
    list-style-type: none;
    text-align: center;
    }
    Change the 20px to your liking (%, em, in, cm, px, pt, etc.)

    Hope that helps!


  •  

    Posting Permissions

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