Jump to content

Archived

This topic is now archived and is closed to further replies.

dustinnoe

Weird Quirk

Recommended Posts

I have a CSS layout which has a centered backgroung image that gives the illusion that the page column extends to the bottom of the browser.  I also have a centered DIV  that hold the contents of the entire page.  For some reason, both FF and IE, interperet the center of these two page elements differently depending on the width of the browser window.  You can check it out at:

[url=http://www.virtuosoweb.com/cr/]http://www.virtuosoweb.com/cr/[/url]

As you are viewing the page, slowly expand the window and watch as the center of these elements change by 1 pixel.  It's really annoying

Thanks,
Dustin

Share this post


Link to post
Share on other sites
I do not think that will affect the page considering that contentWrapper is contained in pageWrapper.  The problem lies in how a web browser determines the center of the page and why it centers a background image differently than a div element. 

Share this post


Link to post
Share on other sites
The problem occurs when the width of the browser is an even number of pixels due to the fact that the width of the background and pageWrapper div are an odd number of pixels wide.  When the brower is an odd number of pixels wide there is no problem.  This means when the browser is an even number of pixels wide there are two pixels that share the center.  For some odd reason, and I stress odd, the brower says, " I will choose the left center pixel to align the div element and the right center pixel to align the background image." Why would Mozilla and Microsoft design browers that do annoying crap like this!  They have to know about it.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.