navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Centering issue with Firefox

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets >> Centering issue with Firefox
Page: [1]
 
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

(in reply to kt)
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

(in reply to Tailslide)
jaybee

 

Posts: 14175
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
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.) :)

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to d a v e)
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

(in reply to jaybee)
jaybee

 

Posts: 14175
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
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.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to Tailslide)
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

(in reply to jaybee)
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

(in reply to d a v e)
Tailslide

 

Posts: 6121
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
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!



_____________________________

"My strategy is so simple an idiot could have devised it"
Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project

(in reply to d a v e)
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

(in reply to Tailslide)
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

(in reply to kt)
womble

 

Posts: 5606
Joined: 3/14/2005
From: Living on the edge
Status: offline

 
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*

_____________________________

~~ "A cruel god ain't no god at all" ~~
:)

(in reply to d a v e)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> Centering issue with Firefox
Page: [1]
Jump to: 1





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