|
Posted by Ben C on 07/14/07 10:36
On 2007-07-13, 0dev <ch1.will@yahoo.com> wrote:
> I'm trying to fix a CSS problem in Safari on Mac.
>
> The following page displays fine on Firefox and IE on Windows and
> Linux:
> http://tinyurl.com/2w9nl3
>
> The page has the following errors on Safari/Mac:
> http://tinyurl.com/3yoj83
> http://tinyurl.com/3xsdc2
>
> The problem is in the footer section (marked in the code with
> comments).
>
> The CSS for that footer section is found at the bottom of this CSS
> file:
> http://tinyurl.com/32yk7p
>
> Why isn't it displaying correctly in Safari/Mac?
The footer is a table, whose width is set to 760px.
Inside its second row are three cells, with widths 316px, 225px, and one
with a div whose outer margin width is 215px. You've also got 15px of
padding on the first cell.
That lot adds up to 771px. So the browser asks itself, well which do you
want? 760px or 771px? Firefox picks 760px, Safari 771px. As it happens,
you wanted 760px so Safari guessed wrong on this occasion.
Easier to let the computer do what it's good at and add the numbers up
for you, so just delete "width=225" from the middle cell in that row. The
browser will give it whatever it can get away with to try to make the
whole thing 760px wide.
Navigation:
[Reply to this message]
|