SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict singersower's Avatar
    Join Date
    Nov 2004
    Location
    TX
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question layout messed up in firefox :(

    shows fine in IE, as usual.......but when I check it in firefox the center div is shoved up into the header.

    My header is a php include, but I didn't think that mattered.....

    http://www.cubpack409.org


    help! and thanks!

    singersower

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One problem is that your 'XHTML' is invalid; add an alt attribute for the image and remove the <h4> from the paragraph. Oh, and write <br&#160;/> instead of <br> if you're going to pretend to use XHTML.

    The reason for the weird display is that you have specified a height for #header, which is only enough to enclose the big image. Then you have links and stuff, and those are rendered outside of the #header (due to the default value of overflow:visible).

    The #center DIV is rendered where it's supposed to: just below the #header. But since the contents of the #header spill out, you get overlap. Remove the height for #header, and it will work better.

    It works in IE, because IE will incorrectly treat height as min-height, i.e. it will expand the #header to enclose all of its content. This is not conforming to the W3C specifications, while Firefox's behaviour is.
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Addict singersower's Avatar
    Join Date
    Nov 2004
    Location
    TX
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, I fixed the css and the tags. It's valid (transitional)
    Is there some other way to use xhtml while using included content? I thought this was the way I was supposed to do it?

    thanks for the tips!

    singersower

  4. #4
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It doesn't make any difference whether you're using included files or not; if you don't write the CSS correctly it won't display as intended.


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
  •