Michelle
Michelle

Reputation: 1844

Positioning 1px off in Safari/Mac but works on Safari/Windows

I'm beating my head against a wall on this one; the logo image ("It's All About Revenue") shifts up by one pixel in Safari on Mac, but renders correctly in all other browser/OS combinations I've been able to test. Does anyone have any ideas on why this might be? Here's the site: http://blog.eloqua.com/

Thanks in advance for your help!

Upvotes: 3

Views: 2970

Answers (2)

Nic Aitch
Nic Aitch

Reputation: 628

I've run into this 1px bug many times, notably when using CSS resets. It is infact a line-height issue.

Set a base line-height for all browsers:

body {
  line-height: 1em;
}

Upvotes: 3

user113716
user113716

Reputation: 322542

The height attribute of the <div class="parentLogo"> element is being computed differently between the two browsers:

You need to set its height attribute manually:

.custom .parentLogo {
    height: 40px;
    ...
}

This should fix the issue.

Upvotes: 4

Related Questions