I have a sprite navigation on the left. I have copied this for my wordpress blog which you can access via my website ('NEWS'), so even though you enter my wordpress, it looks exactly like every other page. All works fine in Safari but in Firefox and IE, the height of the navigation changes, even though all the CSS is the same. Any ideas would be very much appreciated :)

1 answer

1
point

You have no reset.css? so you have some browser defaults affecting your layout.

Safari applies an 8px margin to body, which you've overwritten for your home page with an 8px padding.

Switch to the news page, Safari's 8px margin is allowed to apply, but Firefox and presumably IE don't set a default margin on body.

so you need to duplicate the css for body in the wordpress style.css to match the css for body in stylesheet.css.

e.g.

margin:0;
padding:8px;
Answered almost 7 years ago by Tony Crockford
  • Hrm, thanks Tony.. I tried matching the body in both style sheets and it didn't appear to fix it. Look like it's a difference of 13px.. any other suggestions? Thanks again :) Dan McGrath almost 7 years ago
  • Spot on! +1 o.k.w almost 7 years ago
  • Dan, try setting ul#navigation's margin to 0 too. o.k.w almost 7 years ago
  • I don't see the changes made yet. Are you sure you edited the correct files? match http://www.danm.com.au/stylesheet.css and http://danm.com.au/news/wp-content/themes/danm/style.css Tony Crockford almost 7 years ago
  • oh, now you seem to be relying on defaults for body -which will be different. set a consistent margin/padding for body in both stylesheets apply a reset.css in both your main and news sites maybe? Tony Crockford almost 7 years ago
  • AWESOME, thanks guys! -looks like #navigation not having a 0 margin was causing trouble.. only problem I have found now is that in IE, the menu sits flush to the left of the page (only in IE) as opposed to 40px in, so I put _left: 40px so in IE it would read 40px in as opposed to 0.. do you think that is an ok work around? Cheers again, Dan Dan McGrath almost 7 years ago
  • Ah, good simple answer, forgot that he might've not had one. Anthony Lemmer almost 7 years ago
  • You really ought to have some form of baseline reset for your CSS or you'l have to hack browser by browser. see: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ Tony Crockford almost 7 years ago