X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Fixed width page, centered in browser? (https://forum.x-cart.com/showthread.php?t=48755)

rjmmusic 07-22-2009 09:42 PM

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!

Shamun 07-22-2009 11:19 PM

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;

Pyro 12-13-2009 05:15 PM

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.

Steel 01-14-2010 05:20 PM

Re: Fixed width page, centered in browser?
 
Quote:

Originally Posted by Pyro
I tried your method and I cant seem to get it to work.

Hello Pyro,

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;}

gizmo 01-14-2010 06:32 PM

Re: Fixed width page, centered in browser?
 
Ther's a post here http://forum.x-cart.com/showthread.php?t=51709

ARW VISIONS 01-14-2010 06:58 PM

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.