Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Fixed width page, centered in browser?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-22-2009, 09:42 PM
 
rjmmusic rjmmusic is offline
 

Newbie
  
Join Date: Aug 2006
Location: San Marcos, CA
Posts: 6
 

Default 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!
__________________
Ron Menelli
RJM Music Technology, Inc.
X-Cart Pro 5.2.9
Reply With Quote
  #2  
Old 07-22-2009, 11:19 PM
 
Shamun Shamun is offline
 

X-Adept
  
Join Date: Jun 2009
Location: North Carolina
Posts: 841
 

Default 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;
__________________
- Shane Munroe
Reply With Quote
  #3  
Old 12-13-2009, 05:15 PM
 
Pyro Pyro is offline
 

X-Adept
  
Join Date: Nov 2009
Posts: 506
 

Default 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.
__________________
Best Wishes,
James

4.5.2 Gold (work in progress)
Reply With Quote
  #4  
Old 01-14-2010, 05:20 PM
 
Steel Steel is offline
 

eXpert
  
Join Date: Dec 2006
Posts: 253
 

Default 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;}
__________________
X-Cart Gold v4.6.6
Reply With Quote
  #5  
Old 01-14-2010, 06:32 PM
  gizmo's Avatar 
gizmo gizmo is offline
 

X-Adept
  
Join Date: Jan 2005
Location: Crawley : UK
Posts: 618
 

Default Re: Fixed width page, centered in browser?

Ther's a post here http://forum.x-cart.com/showthread.php?t=51709
__________________
Thank You - Alan
Don't be like me, and keep saying "Nearly did it" go do it!!
Version: 4.4.4 Gold -
Reply With Quote
  #6  
Old 01-14-2010, 06:58 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Fixed width page, centered in browser?

first find which CSS sheet is controlling html,body and page-container

then apply the appropriate code.
__________________
xcart 5.1.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:46 AM.

   

 
X-Cart forums © 2001-2020