Reply
page does not center in firefox
Old 04-14-2008, 02:38 PM page does not center in firefox
Junior Talker

Posts: 1
Name: Ken Ross
can anyone help here. My page centers fine in ie but not in firefox?
kenster is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 04-14-2008, 02:50 PM Re: page does not center in firefox
LadynRed's Avatar
Super Moderator

Posts: 6,535
Location: Tennessee
How are you trying to center it ?

I suggest you try reading the stickies: http://www.webmaster-talk.com/css-fo...r-website.html
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 04-14-2008, 06:18 PM Re: page does not center in firefox
Webmaster Talker

Posts: 560
body {
margin-right: auto;
margin-left: auto;
text-align: center;
}

That should do the trick, assuming you are using CSS .

Matt
170 Designs is offline
Reply With Quote
View Public Profile
 
Old 04-14-2008, 07:00 PM Re: page does not center in firefox
joder's Avatar
Flipotron

Posts: 6,443
Name: James
Location: In the ocean.
No I don't since you didn't post a link.
joder is offline
Reply With Quote
View Public Profile
 
Old 04-14-2008, 07:16 PM Re: page does not center in firefox
Gilligan's Avatar
Dead Like Me

Posts: 1,608
Name: Stefan
Location: London, UK
Quote:
Originally Posted by 170 Designs View Post
body {
margin-right: auto;
margin-left: auto;
text-align: center;
}

That should do the trick, assuming you are using CSS .

Matt
sorry, I hate to do this but you can do this by margin:0 auto; just shorter that way ,

also text-align:center; isn't needed,

and there must be a width set
Gilligan is offline
Reply With Quote
View Public Profile
 
Old 04-14-2008, 07:57 PM Re: page does not center in firefox
LadynRed's Avatar
Super Moderator

Posts: 6,535
Location: Tennessee
Hold on there... you can't margin: 0 auto on the BODY, that won't work, and setting a width on the BODY is equally pointless.

Apply margin: 0 auto, and a width on div you're trying to center, now THAT will work !
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 04-14-2008, 08:05 PM Re: page does not center in firefox
Gilligan's Avatar
Dead Like Me

Posts: 1,608
Name: Stefan
Location: London, UK
Quote:
Originally Posted by LadynRed View Post
Hold on there... you can't margin: 0 auto on the BODY, that won't work, and setting a width on the BODY is equally pointless.

Apply margin: 0 auto, and a width on div you're trying to center, now THAT will work !
woops, thought he was setting it for a div.
Gilligan is offline
Reply With Quote
View Public Profile
 
Old 04-14-2008, 08:43 PM Re: page does not center in firefox
johniman7's Avatar
President, JLI Media

Posts: 759
Name: John Irving
What I would do is create either a div named content or container (or a table consisting of one huge cell) and center that. Example...

Quote:
<html>
<body>
<center>
<div id="container"> My Content </div>
</center>
</body>
</html>
Of course, you would have to use html or css to set a width for that area.
__________________
John Irving: President, JLI Media
"Smoke screen from under my muffler, at the push of a button, i'm a hustla"
Chernobyl Accident ~ Xmod Li Ion Kits ~ Fourth Fast and Furious Movie
johniman7 is offline
Reply With Quote
View Public Profile Visit johniman7's homepage!
 
Old 04-14-2008, 08:46 PM Re: page does not center in firefox
joder's Avatar
Flipotron

Posts: 6,443
Name: James
Location: In the ocean.
I wouldn't use the <center> tag. That is deprecated. Use CSS on a div like LadynRed pointed out.
joder is offline
Reply With Quote
View Public Profile
 
Old 04-14-2008, 09:59 PM Re: page does not center in firefox
johniman7's Avatar
President, JLI Media

Posts: 759
Name: John Irving
Yep, good point. I was thinking of using that but for simplicity sake used center. The center aligned div is needed for xhtml I believe as well.
__________________
John Irving: President, JLI Media
"Smoke screen from under my muffler, at the push of a button, i'm a hustla"
Chernobyl Accident ~ Xmod Li Ion Kits ~ Fourth Fast and Furious Movie
johniman7 is offline
Reply With Quote
View Public Profile Visit johniman7's homepage!
 
Old 04-14-2008, 10:07 PM Re: page does not center in firefox
mynameisfai's Avatar
Skilled Talker

Posts: 50
wow good info i get here
mynameisfai is offline
Reply With Quote
View Public Profile
 
Old 04-15-2008, 04:31 AM Re: page does not center in firefox
Novice Talker

Posts: 12
Name: Nitin
wat ladyn said is rite
i tried the same n yea the probs fixed
cheers
d3c3nt is offline
Reply With Quote
View Public Profile
 
Old 04-15-2008, 10:12 PM Re: page does not center in firefox
Experienced Talker

Posts: 33
Name: Shawn Lindsey
Hello,
Also if you are not using CSS, using Tables, is sort of older way to do them, but still pretty popular, just make sure the table it self, is centered and it should center perfectly and be able to expand to fit different resolutions, as long as you make the table in a % and not in Pixels.

Hope this helps some, please let me know if there is anything else I can do for you.
__________________
http://www.shawnsitsolutions.com Web and Graphic Design, Wordpress, XHTML/CSS, Ecommerce and more.
http://www.discountestore.com Discount Electronics, Computer Parts, and More.
ShawnITSolution is offline
Reply With Quote
View Public Profile
 
Old 04-16-2008, 07:06 AM Re: page does not center in firefox
Gilligan's Avatar
Dead Like Me

Posts: 1,608
Name: Stefan
Location: London, UK
Don't use tables. Center with divs, NOT with tables
Gilligan is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to page does not center in firefox
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.17556 seconds with 12 queries