page does not center in firefox
04-14-2008, 02:38 PM
|
page does not center in firefox
|
Posts: 1
Name: Ken Ross
|
can anyone help here. My page centers fine in ie but not in firefox?
|
|
|
|
04-14-2008, 02:50 PM
|
Re: page does not center in firefox
|
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
|
|
|
|
04-14-2008, 06:18 PM
|
Re: page does not center in firefox
|
Posts: 560
|
body {
margin-right: auto;
margin-left: auto;
text-align: center;
}
That should do the trick, assuming you are using CSS  .
Matt
|
|
|
|
04-14-2008, 07:00 PM
|
Re: page does not center in firefox
|
Posts: 6,443
Name: James
Location: In the ocean.
|
No I don't since you didn't post a link.
|
|
|
|
04-14-2008, 07:16 PM
|
Re: page does not center in firefox
|
Posts: 1,608
Name: Stefan
Location: London, UK
|
Quote:
Originally Posted by 170 Designs
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
|
|
|
|
04-14-2008, 07:57 PM
|
Re: page does not center in firefox
|
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
|
|
|
|
04-14-2008, 08:05 PM
|
Re: page does not center in firefox
|
Posts: 1,608
Name: Stefan
Location: London, UK
|
Quote:
Originally Posted by LadynRed
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.
|
|
|
|
04-14-2008, 08:43 PM
|
Re: page does not center in firefox
|
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.
|
|
|
|
04-14-2008, 08:46 PM
|
Re: page does not center in firefox
|
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.
|
|
|
|
04-14-2008, 09:59 PM
|
Re: page does not center in firefox
|
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.
|
|
|
|
04-14-2008, 10:07 PM
|
Re: page does not center in firefox
|
Posts: 50
|
wow good info i get here
|
|
|
|
04-15-2008, 04:31 AM
|
Re: page does not center in firefox
|
Posts: 12
Name: Nitin
|
wat ladyn said is rite
i tried the same n yea the probs fixed
cheers
|
|
|
|
04-15-2008, 10:12 PM
|
Re: page does not center in firefox
|
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.
|
|
|
|
04-16-2008, 07:06 AM
|
Re: page does not center in firefox
|
Posts: 1,608
Name: Stefan
Location: London, UK
|
Don't use tables. Center with divs, NOT with tables
|
|
|
|
|
« Reply to page does not center in firefox
|
|
|
Posting 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
|
|
|
|
|
|