1
dhthwy
help getting default them to center
  • 2007/5/4 18:13

  • dhthwy

  • Just popping in

  • Posts: 5

  • Since: 2007/5/4 1


I set a fixed width for the default theme ( 800px ) and it seems to look good that way... but the page is aligned to the left. In theme.html i tried setting align=center in body, i also made a new table just under the body element that has align=center. the new table i added should be the container for all the other tables on the site and so everything should be centered, but its not working... how do i get the page to center?

2
dhthwy
Re: help getting default them to center
  • 2007/5/4 19:00

  • dhthwy

  • Just popping in

  • Posts: 5

  • Since: 2007/5/4 1


Looking at the page source I can't find anything that would be aligning the page to the left unless there is something in the style sheets. I did delete the contents of the template_c directory each time i edited theme.html. i tried making a div container just under <body> as well, nothing works, it's driving me nuts!

3
JMorris
Re: help getting default them to center
  • 2007/5/4 19:21

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


Just after the <body> tag, add <div id="wrap">
Just before the </body> tag, add </div>
In style.css, add #wrap {width:770px; margin:auto;}

This will give you a centered 770px fixed-width layout.

HTH.

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

4
dhthwy
Re: help getting default them to center
  • 2007/5/4 19:28

  • dhthwy

  • Just popping in

  • Posts: 5

  • Since: 2007/5/4 1


thank you for your reply, but I just found a fix.

this also works:

in the body css element:

margin-left: auto
margin-right: auto

If you think there might be problem using that method, let me know and I'll do it the way you suggested

Login

Donat-O-Meter

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