![]() |
Fixed width page, centered in browser?
I'd like to set up my templates such that everything fits within a fixed width area, and that fixed width is centered horizontally in the browser window. I was able to implement the fixed width by setting:
#content-container { width: 770px; } but I can't figure out how to center everything on the page? What's the easiest way to do this? Thanks! |
Re: Fixed width page, centered in browser?
Whichever div that comes after <body> in the layout put this:
margin-left:auto; margin-right:auto; You may also have to use padding such as this: padding-left:30px; padding-right:30px; |
Re: Fixed width page, centered in browser?
Tal:
I tried your method and I cant seem to get it to work. rjmmusic, did you ever find a way to get this to work? I am trying to do something very similar. |
Re: Fixed width page, centered in browser?
Quote:
For 4.3.0 with basic skin, FLC, and Firefox check the following: main.css html,body {min-width: 700px;} #page-container {width: 700px;} altskin.css #page-container {width: 700px;} .flc-container #center-main {width: 700px;} |
Re: Fixed width page, centered in browser?
Ther's a post here http://forum.x-cart.com/showthread.php?t=51709
|
Re: Fixed width page, centered in browser?
first find which CSS sheet is controlling html,body and page-container
then apply the appropriate code. |
All times are GMT -8. The time now is 05:46 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.