1
Jharis
Is there a better way to center a site for cross browsers viewing?
  • 2005/8/13 2:16

  • Jharis

  • Just can't stay away

  • Posts: 488

  • Since: 2005/2/13


Hi everyone,

In the body of my style sheet I use "margin" to center my site in the browsers window. When navigating around my site using firefox the site jumps a little to the left or right, but is rock solid in IE. How should you center your site for best viewing with different browsers? Is the margin command wrong?

example
body {width:760px; background:#000000; margin-left:auto; margin-right:auto;}.

I have tried margin:auto; too, but still the same.


don (el paso)
motto - green chili for everything!

2
Bassman
Re: Is there a better way to center a site for cross browsers viewing?
  • 2005/8/13 3:00

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


In your theme.html, just after the <body> tag:
<div align="center">

Then just before the closing </body> tag:
</div>

3
Jharis
Re: Is there a better way to center a site for cross browsers viewing?
  • 2005/8/13 4:17

  • Jharis

  • Just can't stay away

  • Posts: 488

  • Since: 2005/2/13


I still have a little hop to the side when naving my site, but only in firefox. Thanks for the help though. If you have more suggestions I will try.

I notice when I change to a page that has more padding between the center left and left colum is when the problem seems to happen. I am going to validate my CSS and go back over things again.

thanks

don (el paso)
motto - green chili for everything!

Login

Who's Online

169 user(s) are online (107 user(s) are browsing Support Forums)


Members: 0


Guests: 169


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits