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 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2007
    Posts
    79
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Positioning Issue CSS -RESOLVED-

    Hello. I am trying to position my navbar elements with an UL. Usually, I set the list up and use margins on the UL to position it. However, in this layout, when margins or padding are added to the nav UL it moves the background image for #nav. I dont understand why this is happening. Any help is much appreciated.

    http://www.imikedesigns.com/RedCreekResources

    Mike
    Last edited by Muckiem14; 07-20-2007 at 05:59 AM.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Thats because padding adds to overall width and/or height if you add 5px padding then your nav becomes 40px high.
    Code:
    #nav  {
    background:url(images/menuBG.gif) no-repeat;
    height:23px;
    margin-top:3px;
    padding:7px 7px 0;
    }
    Try that.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    Jun 2007
    Posts
    79
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Thanks for the quick repsonse Aerospace. Now I understand.


  •  

    Posting Permissions

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