Centering issue with Firefox (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


kt -> 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 -> 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.




d a v e -> 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/




jaybee -> RE: Centering issue with Firefox (11/10/2005 11:01:40)

And mine

(Dave I really must have a word with you about the meaning of the word SITE as opposed to PAGE.) [:D]




Tailslide -> 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?




jaybee -> RE: Centering issue with Firefox (11/10/2005 11:56:23)

Well I don't remember my site going wonky in IE5.5 but I could be wrong. I don't use strict doctype though, I use transitional even though the code is strict.




d a v e -> 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' :




d a v e -> 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 :(





Tailslide -> RE: Centering issue with Firefox (11/10/2005 13:08:58)

Ha ha! See! Bound to be right one of these days - just by sheer weight of probability!





d a v e -> RE: Centering issue with Firefox (11/10/2005 13:22:37)

standalone explorers - can be a bit buggy




kt -> RE: Centering issue with Firefox (11/11/2005 8:05:02)

Thanks Tailslide, works perfectly!

kt




womble -> RE: Centering issue with Firefox (11/11/2005 8:21:48)

quote:

ORIGINAL: d a v e

standalone explorers - can be a bit buggy

= very buggy

...and IE5.5 ***** up my nicely centred sites too *sigh*




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.078125