SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2003
    Location
    Phoenix, AZ.
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Extra space in div in Firefox/NS

    I have extra space within my div at the top, like the space of a <br />, but there is none. Only shows in FF/NS not IE. Wish I could show you but it's on my local PC. I'm using XHTML 1.0 strict, margins and padding are all 0, it's an absolute positioned div, with nested divs inside. It's like a 10px difference, really frustrating me.

    To explain:

    In FF/NS:
    ---------------------top of div

    My text starts here
    ---------------------end of div

    In IE
    ---------------------top of div
    My text starts here no space
    ----------------------

    Any pointers to check out, Thanks

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you sure that you have set the top margin of any descendant element to 0?
    If you have something like this:
    HTML Code:
    <div>
      <p>My text starts here</p>
    </div>
    it's not enough to set margin:0 for the <div>, you also has to set margin-top:0 for the <p>.
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2003
    Location
    Phoenix, AZ.
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    doh, ya I missed something really stupid I thought I had already checked, never fails post on the forum and figure out it's just something simple


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
  •