Grow your CSS skills. Land your dream job.

Unwanted gap between top of window and header…

  • # March 4, 2009 at 5:54 am

    http://siephed.org/47/index.php. There’s a index.html and an index.php file uploaded in that directory. If you look at both, you’ll notice that the header for index.html is where it’s supposed to be, while in the index.php file, there’s a gap that’s filled by the background between the header and the top of the browser window. I have no clue what’s wrong, the only difference in code being that in index.php, the top and bottom halves are spliced so I use <?php include(‘header.txt’); ?> to include them into index.php.

    # March 4, 2009 at 11:10 am

    Looks fine in FF3 for me.

    Site looks VERY broken in IE7.

    Make sure to validate: http://validator.w3.org/check?uri=http% … omatically)&doctype=Inline&group=0

    Can you be more specific as to what browser/operating system you are experiencing this in?

    # March 5, 2009 at 6:34 am

    The latest version of FF… I haven’t tested it in IE yet… And as for that error, I must’ve erased one of the meta tags by accident.. it was fine before.

    But that error still doesn’t help, even if it was fixed, the unwanted gap is still there. And I dunno why…

    # March 5, 2009 at 11:14 am

    For starters, make sure the content on both is identical. It can be difficult troubleshooting when the content is different.

    Remove the includes on the .php version, for testing purposes. If it’s working fine with the includes removed, you know you have a problem with those, and not the style sheet. As far as I can tell, it’s the only thing that might be causing the problem.

    Actually, I just did a quick test. It MUST be something with the include and/or the content. I just copied the content from the HTML version into the PHP version and the header aligned properly. Check the differences between the content and you’ll find your answer.

    # March 6, 2009 at 6:55 am

    I know it is the problem between the includes and main.. i’ve got an html copy uploaded along with a .php file included. Both their content are the same, except the php one is simply spliced into parts… but i still get the gap in the php version and I really don’t know why.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".