Forum Moderators: not2easy

Message Too Old, No Replies

Safari (and Opera) center differently than Firefox

Trying to figure out if this is a known issue and possible solutions

         

illtron

7:28 am on Jun 1, 2008 (gmt 0)

10+ Year Member



Here's my situation...

My layout relies on my background image being centered. I'm using the Blueprint CSS framework, so I've got a 950 px-wide space centered in the middle for my content.

Imagine it like this...

bgbgbgbgbgbgbgbg 9 5 0 - p x w i d e c o n t e n t a r e a bgbgbgbgbgbgbgbg

Now, when I put something in that space, it behaves slightly differently in Firefox than in other browsers. In Firefox, the content inside is 1px farther to the right than in Opera or Safari (I don't have a PC around to test in IE right now).

What I get in Firefox is more like this, where the vertical pipe to the left of the content area is the 1px space:

bgbgbgbgbgbgbgbg¦ 9 5 0 - p x w i d e c o n t e n t a r e a bgbgbgbgbgbgbgbg

Has anybody dealt with this? Is there a workaround? Did what I just say make any sense at all?

swa66

11:03 pm on Jun 1, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Let's say your visual viewport is actually 1001 pix wide.
you want to center a 950 pix wide image in it.

So you have to divide 51 pix in two: which side is going to get 25 and which side 26 ? Left or right going to be larger ? Based on what will you decide ?

Don't think you can ever rely up to the pixel for this ...