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

How to change the site layout to fixed width.

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-29-2008, 08:42 AM
 
junliw1975 junliw1975 is offline
 

Advanced Member
  
Join Date: Dec 2008
Location: Maple, Ontario, Canada
Posts: 62
 

Red face How to change the site layout to fixed width.

Hey Guys:

I have been trying to figure out how to change the site layout to the fixed width.

I read the guide and eidt the file rectangle_top.tpl as follow but nothing happened. It dirves me mad and I don't know how to fix it. I am using 4.2 gold.
------------------
{*
$Id: rectangle_top.tpl,v 1.26 2008/08/21 09:52:40 max Exp $
vim: set ts=2 sw=2 sts=2 et:
*}
<table class="Container" cellpadding="0" cellspacing="0" width="{980"}">
<tr><td class="Container">
-------------------
PLEASE HELP!!

__________________
x-cart-4.7.5 Gold ,
Reply With Quote
  #2  
Old 12-29-2008, 08:56 AM
 
junliw1975 junliw1975 is offline
 

Advanced Member
  
Join Date: Dec 2008
Location: Maple, Ontario, Canada
Posts: 62
 

Default Re: How to change the site layout to fixed width.

I just found out I have to edit main.css file. I was able to change to width to 980px but everything is floating to right and the header width is still 100%, what should I do.

---
/*================================================= =============================
layout styles
================================================== ============================*/
/* page container */
#page-container {
min-height: 100%;
position: relative;
}
/* page layout */
#content-container {
clear: both;
float: right;
overflow: hidden;
position: relative;
width: 980px;
padding-bottom: 39px;
margin-top: 140px;
}
#content-container2 {
float: left;
position: relative;
right: 100%;
width: 200%;
}
#center {
float: left;
position: relative;
width: 50%;
left: 50%;
__________________
x-cart-4.7.5 Gold ,
Reply With Quote
  #3  
Old 12-29-2008, 12:31 PM
 
jholley jholley is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 66
 

Default Re: How to change the site layout to fixed width.

you need to edit the page container
#page-container {
width: 980px;
min-height: 100%;
position: relative;
}


it would be best to put your page layout back to 100% also
__________________
Joe Holley
4.2
Reply With Quote

The following user thanks jholley for this useful post:
willwinman (02-23-2009)
  #4  
Old 12-29-2008, 01:17 PM
 
junliw1975 junliw1975 is offline
 

Advanced Member
  
Join Date: Dec 2008
Location: Maple, Ontario, Canada
Posts: 62
 

Default Re: How to change the site layout to fixed width.

Thanks!!

It works but how can I make the site in the center. I change to "float" to middle or center but it didn't work.
__________________
x-cart-4.7.5 Gold ,
Reply With Quote

The following user thanks junliw1975 for this useful post:
willwinman (02-23-2009)
  #5  
Old 12-29-2008, 01:24 PM
 
jholley jholley is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 66
 

Default Re: How to change the site layout to fixed width.

add this to your page container
margin: auto;
__________________
Joe Holley
4.2
Reply With Quote

The following user thanks jholley for this useful post:
willwinman (02-23-2009)
  #6  
Old 12-30-2008, 10:31 PM
 
junliw1975 junliw1975 is offline
 

Advanced Member
  
Join Date: Dec 2008
Location: Maple, Ontario, Canada
Posts: 62
 

Default Re: How to change the site layout to fixed width.

Thanks, it works!!!
__________________
x-cart-4.7.5 Gold ,
Reply With Quote
  #7  
Old 01-02-2009, 06:33 PM
 
junliw1975 junliw1975 is offline
 

Advanced Member
  
Join Date: Dec 2008
Location: Maple, Ontario, Canada
Posts: 62
 

Default Re: How to change the site layout to fixed width.

It's strange, it worked for a while and now it doesn't work anymore. I contacted help desk and here is what I got but still doesn't work.
-------
Please try to modify the width parameter of the <table> tag in the following templates:
1. skin1/rectangle_top.tpl
replace width="{$width|default:"100%"}"
with width="980"

2. skin1/head.tpl
replace <table cellpadding="0" cellspacing="0" width="100%">
with <table cellpadding="0" cellspacing="0" width="980">

3. skin1/customer/home.tpl
replace <table width="100%" cellpadding="0" cellspacing="0">
with <table width="980" cellpadding="0" cellspacing="0">
---------------------

I couldn't even find the parameter in home.tpl!!

Anyone can help, please?
__________________
x-cart-4.7.5 Gold ,
Reply With Quote
  #8  
Old 01-03-2009, 06:36 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: How to change the site layout to fixed width.

It sounds like they gave you instructions for versions prior to 4.2. As far as I can tell 4.2 doesn't use rectangle_top.tpl (or rectangle_bottom.tpl) except on the admin side.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #9  
Old 01-03-2009, 06:54 AM
 
junliw1975 junliw1975 is offline
 

Advanced Member
  
Join Date: Dec 2008
Location: Maple, Ontario, Canada
Posts: 62
 

Default Re: How to change the site layout to fixed width.

I think you are right!! I have to edited main.css to change the width but I can't make it to center. I used Joe's code and it worked for a while but it doesn't anymore, I don't know why.

Here is Joe's code
--------------------
#page-container {
width: 980px;
min-height: 100%;
position: relative;
margin: auto;
}
-----------------
__________________
x-cart-4.7.5 Gold ,
Reply With Quote
  #10  
Old 01-03-2009, 06:56 AM
 
junliw1975 junliw1975 is offline
 

Advanced Member
  
Join Date: Dec 2008
Location: Maple, Ontario, Canada
Posts: 62
 

Default Re: How to change the site layout to fixed width.

Some how the code doesn't work anymore, can you help me out here. thanks in a million.

#page-container {
width: 980px;
min-height: 100%;
position: relative;
margin: auto;
}
__________________
x-cart-4.7.5 Gold ,
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 03:20 AM.

   

 
X-Cart forums © 2001-2020