|
| |
|
|
kt
Posts: 195 Joined: 11/3/2004 Status: offline
|
Centering issue with Firefox - 11/10/2005 6:14:10
Hello On IE, my site is centred on the screen, which I've achieved with body {
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 11px;
margin: 0px;
text-align: center;
background-color: #EFEFEF;
}
But it doesn't work on Firefox. What do I need to do to get the whole thing centred with Firefox too?! (Still quite new to CSS) The site is here Many thanks, kt
|
|
|
|
Tailslide
Posts: 6121 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: Centering issue with Firefox - 11/10/2005 6:17:52
Hi What I do is to stick all the content in a container div and center that - #container {margin 0 auto; text-align:left;} Aligning the text left in the container normalises it for everything within the container and means you don't have to keep repeating it lower down. I also keep text-align: center in the body element to centre properly in IE.
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
|
|
d a v e
Posts: 4143 Joined: 7/24/2002 From: England (but live in Finland now) Status: offline
|
RE: Centering issue with Firefox - 11/10/2005 10:40:56
Tailslide: if you use a strict doctype i think you only need to use the margin:auto 0 bit in IE as well, at least that works for my site http://members.tiscali.fi/dave_pirjo/
_____________________________
David Prescott Gekko web design
|
|
|
|
Tailslide
Posts: 6121 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: Centering issue with Firefox - 11/10/2005 11:37:27
The margin auto bit will work for IE6 with strict doctype in standards mode but I always thought IE5/5.5 were permanently in quirks mode - is that wrong?
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
|
|
d a v e
Posts: 4143 Joined: 7/24/2002 From: England (but live in Finland now) Status: offline
|
RE: Centering issue with Firefox - 11/10/2005 12:34:57
quote:
(Dave I really must have a word with you about the meaning of the word SITE as opposed to PAGE.) lol! but quote:
I don't use strict doctype though, I use transitional even though the code is strict. JB i really must have a word with you about the meaning of LOGIC as opposed to WOMAN'S 'LOGIC' :
_____________________________
David Prescott Gekko web design
|
|
|
|
d a v e
Posts: 4143 Joined: 7/24/2002 From: England (but live in Finland now) Status: offline
|
RE: Centering issue with Firefox - 11/10/2005 12:37:11
tailslide - you're right! eek it doesn't work in IE 5/5.5 :(
_____________________________
David Prescott Gekko web design
|
|
|
|
d a v e
Posts: 4143 Joined: 7/24/2002 From: England (but live in Finland now) Status: offline
|
RE: Centering issue with Firefox - 11/10/2005 13:22:37
standalone explorers - can be a bit buggy
_____________________________
David Prescott Gekko web design
|
|
|
|
kt
Posts: 195 Joined: 11/3/2004 Status: offline
|
RE: Centering issue with Firefox - 11/11/2005 8:05:02
Thanks Tailslide, works perfectly! kt
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|