Forums

[resolved] Header is one pixel off in mozilla based browsers (4 posts)

  1. curtisblackwell
    Member
    Posted 9 months ago #

    The site I'm working on looks correct in webkit based browsers (Safari, Chrome, etc.) but the header is one pixel to the right in Firefox.

    Header:

    <div id="page-wrap">
    
    	<a href="http://stpaulsfmc.com/"><img id="header" alt="Saint Paul's Free Methodist Church" src="/images/header.png" width="980" height="84" /></a>
    	<img id="navbar" alt="navigation bar" src="/images/navbar.png" width="980" height="51" usemap="#nav" />
    		<map id="nav" name="nav">
    			<area alt="about us" coords="367, 8, 452, 28" href="/about-us/" shape="rect" />
    			<area alt="events" coords="475, 8, 540, 28" href="/events/" shape="rect" />
    			<area alt="ministries" coords="563, 8, 650, 28" href="/ministries/" shape="rect" />
    			<area alt="resources" coords="673, 8 , 765, 28" href="/resources/" shape="rect" />
    		</map>

    The page-wrap div closes in the footer.php file just before it gets the footer. I tried taking the header out of the page-wrap to no avail. The images are all the correct widths, I've made sure several times.

    CSS:

    /*
    	STRUCTURE
    */
    
    #page-wrap {
    	height: auto !important;
    	height: 100%;
    	margin: 0pt auto -37px;
    	min-height: 100%;
    	width: 980px;
    	}
    
    #push { height: 37px; }
    
    /*
    	HEADER
    */
    
    img#header {
    	margin: 0pt auto;
    	width: 980px;
    	}
    
    img#navbar {
    	margin: 0pt auto;
    	width: 980px;
    	}

    The HTML is valid, and for some reason the CSS validator can't find the CSS file, even though when I click the link to where the file is supposed to be (and is) generated by the validator, it opens it up.

  2. thisisedie
    Member
    Posted 9 months ago #

    As for being off a pixel I'm checking it out but as for the CSS, it finds it:

    http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fstpaulsfmc.com%2Fwp-content%2Fthemes%2FSTP+Theme%2Fstyle.css&profile=css21&usermedium=all&warning=1&lang=en

    it just doesn't like it. And it tells you why:

    Property overflow-y doesn't exist in CSS level 2.1 but exists in [css3] : scroll

    When you get rid of the html { overflow-y: scroll; } the CSS validates just fine.

  3. thisisedie
    Member
    Posted 9 months ago #

    I believe it's off because the background is centered in the body tag instead of a set container. I'm not sure why that happens but the way I avoid it is by having my background in a container. The theme is more than a pixel off in IE7 BTW. It's a pixel off AND there's a 3 pixel space between the header and the nav bar.

  4. curtisblackwell
    Member
    Posted 9 months ago #

    Well, that's strange… removing the

    html { overflow-y: scroll; }

    fixed the header.

    Thanks thisisedie.

Reply

You must log in to post.

About this Topic