SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Guru htown's Avatar
    Join Date
    Mar 2005
    Posts
    671
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    need help with <ul> nav in footer

    I am using in include for this simple horizontal navigation and for the purposes of maintenance, I am using the same include for the footer as well with different css. Looks fine in IE (believe it or not) and off in FF. I am sure it has something to do with margins/padding but I am not able to figure it out.

    Thanks

    http://70.87.62.162/~jackson/index.php
    Houston Brown
    Split Light Designs
    Bringing your ideas to light.

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,350
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    The ul has a default top margin of 1em in firefox which you haven't addressed in the footer code.

    Code:
    #footer ul {
    padding:0px;
    list-style-type: none;
     margin:0;
    }

  3. #3
    SitePoint Guru htown's Avatar
    Join Date
    Mar 2005
    Posts
    671
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I love simple solutions. Thank you. Not sure why I did not notice that but it happens.

    Now that I have (or you have) corrected that. Why the difference in left margins between the two browsers?

    Thanks
    Houston Brown
    Split Light Designs
    Bringing your ideas to light.

  4. #4
    SitePoint Enthusiast
    Join Date
    Dec 2006
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the menu position looks the same in FF, IE6 and IE7... so i dunno.

    Regarding the native margin on elements, one thing i typically do at the start of all of my css documents is add a simple

    Code:
    * {
       margin:0;
       padding:0
    }
    and then continue on my merry way assigning padding and margins how i want them, rather than how browsers natively treat them.
    Robust, Scalable, Custom Ecommerce Solution

  5. #5
    SitePoint Guru htown's Avatar
    Join Date
    Mar 2005
    Posts
    671
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That would certainly set everything on an equal plane wouldn't it. I think I will have to incorporate that into my css as well. Thanks for the tip.

    You are correct about the left margins. I guess I was not refreshed on the browser
    Houston Brown
    Split Light Designs
    Bringing your ideas to light.

  6. #6
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,350
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    You are correct about the left margins
    Note that on a ul some browsers apply a default left-padding in order to allow space for the bullet to show and some browsers apply a default left margin. Therefore you need to address both.


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
  •