 |
 |
Centering and Margins ignored in Firefox/Safari
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Oct 2003
Location: London
Status:
Offline
|
|
Hi there
Just getting to grips with CSS/Web Standards....so excuse my code if it's not great.
Could someone please explain to me why, with my site in development, the margins and centering works fine in ie 6 on windows, but using Safari and Firefox this is ignored!?
the link is here
the css is a file called farley.css
http://www.parallaxstudios.co.uk/sta...ley/farley.css
Many thanks
Paul
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Nov 1999
Status:
Offline
|
|
Always assume that IE/Windows is getting it wrong. There is a very small number of situations in which this assumption will be mistaken, but it will almost always be correct.
Anyway, in your "#sidebar p" rule, you've set the margin to "15" instead of "15px". This looks like a typo, since you've set the other margins in terms of px, but you can only omit the unit (px in this case) when the length is 0, because that's the only length which is the same in all units. Change it to "15px" and your sidebar's centering should be fixed. While you're at it, "line-height" is set to "1.1 em"; remove the space.
You have a similar problem with "#primarycontent h1", where you set margin-left to "37", and in "#primarycontent img" where you set margin-top to "10".
Other than that, I don't see anything off the top of my head, but give those a shot and let us know how it goes.
|
|
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Oct 2003
Location: London
Status:
Offline
|
|
Thanks very much. That has sorted out the margins perfectly. A silly mistake I made, that copying and pasting turned into a bigger one!
I still have the problem where I want my fixed width table (2 actually, one on top of the other) to sit horizontally in the centre of the screen. I take you point re IE, but at the moment that is the only browser it works on.
In the markup both tables have align="center" - should I be ditching this and doing something in my body selector in CSS?
I also I have slight alignment issues in the 'Nav' element that don't exist in ie/windows...
Thanks again
Paul
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Nov 2004
Location: Stockholm, Sweden
Status:
Offline
|
|
ick. IE. i always work to Firefox, then add whatever hacks need to be added for IE6, IE5.5 & IE5.0
it sucks to have to work like that. can't we just kill everyone who uses IE?
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status:
Offline
|
|
Originally posted by Phil Sherry:
it sucks to have to work like that. can't we just kill everyone who uses IE?
But how would we then feel superior if there were no inferior web monkeys to poke fun at? Where'd be the satisfaction in that?
|
|
Computer thez nohhh...
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Nov 2004
Location: Stockholm, Sweden
Status:
Offline
|
|
Originally posted by Simon Mundy:
But how would we then feel superior if there were no inferior web monkeys to poke fun at? Where'd be the satisfaction in that?
you've got a point there, but i'm going to ignore it and push on with my plan to exterminate all IE users!
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Oct 2003
Location: London
Status:
Offline
|
|
Thanks everyone - managed to sort it out and it looks perfect now!
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|