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

Change width, center site & change background color

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-25-2009, 06:22 AM
 
RandyK RandyK is offline
 

Advanced Member
  
Join Date: Jul 2008
Posts: 63
 

Default Change width, center site & change background color

What's the best way in 4.2 to change the width of the site, center the site and change the background color?
__________________
4.1.10
4.2
X-Magnifier
Fancy Categories
Reply With Quote
  #2  
Old 02-26-2009, 03:47 AM
  Victor D's Avatar 
Victor D Victor D is offline
 

X-Adept
  
Join Date: Aug 2008
Posts: 643
 

Default Re: Change width, center site & change background color

http://forum.x-cart.com/showpost.php?p=244962&postcount=28
to change color:
Code:
html, body{background-color:#33657f; }
__________________
Regards,
Victor Dubiniuk

X-Cart Skins Store
- twenty two different skins for 4.1.x and 4.2.x;
- 4.3.x compatible versions are available;
- refresh you store now!

Smart menu X-Cart add-on for 4.1.8 - 4.3.x
Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x
Reply With Quote
  #3  
Old 02-26-2009, 04:46 AM
 
RandyK RandyK is offline
 

Advanced Member
  
Join Date: Jul 2008
Posts: 63
 

Default Re: Change width, center site & change background color

Hi Victor,

Thanks for your reply. I'm still having problems with what should be simple. I was able to change the width of the site by changing the 100% to 80% in the following main/css:

#content-container {
clear: both;
float: left;
overflow: hidden;
position: relative;
width: 80%;
padding-bottom: 39px;
margin-top: 140px;

However, I still can't figure out how to center the site and change the background color of the outer region.
__________________
4.1.10
4.2
X-Magnifier
Fancy Categories
Reply With Quote
  #4  
Old 02-26-2009, 06:19 AM
  Victor D's Avatar 
Victor D Victor D is offline
 

X-Adept
  
Join Date: Aug 2008
Posts: 643
 

Default Re: Change width, center site & change background color

As it is written in the post I linked above
You should specify width for #page-container and set its left and right margins to auto.
That's all the trick for centering page content
And then specifying separate background colors for
html, body
and
page-container you will gain desired result
__________________
Regards,
Victor Dubiniuk

X-Cart Skins Store
- twenty two different skins for 4.1.x and 4.2.x;
- 4.3.x compatible versions are available;
- refresh you store now!

Smart menu X-Cart add-on for 4.1.8 - 4.3.x
Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x
Reply With Quote
  #5  
Old 02-26-2009, 07:33 AM
 
RandyK RandyK is offline
 

Advanced Member
  
Join Date: Jul 2008
Posts: 63
 

Default Re: Change width, center site & change background color

Thanks for your help, but I still can't get the site to center. Any other suggestions? Much appreciated.
__________________
4.1.10
4.2
X-Magnifier
Fancy Categories
Reply With Quote
  #6  
Old 02-27-2009, 02:37 PM
  buckyreal2's Avatar 
buckyreal2 buckyreal2 is offline
 

Member
  
Join Date: Jul 2003
Location: Minneapolis, Minnesota
Posts: 11
 

Default Re: Change width, center site & change background color

I've messed with the page-container(s) too... no love.

The main trouble seems that all the elements that are floating tend to float off the center of the page. They are stuck, or at least their contents are stuck to the left and right margins.

Is there another thread that clears up how to modify the default layout into something more flexible?
__________________
X-Cart 4.2
Reply With Quote
  #7  
Old 02-27-2009, 02:39 PM
  buckyreal2's Avatar 
buckyreal2 buckyreal2 is offline
 

Member
  
Join Date: Jul 2003
Location: Minneapolis, Minnesota
Posts: 11
 

Default Re: Change width, center site & change background color

The style sheet definitions in html seem well suited to customization. The stylesheet itself needs a major redesign/optimization before it's flexible or particularly easy to work with.
__________________
X-Cart 4.2
Reply With Quote
  #8  
Old 02-28-2009, 03:28 PM
 
pfarcus pfarcus is offline
 

Senior Member
  
Join Date: Jan 2009
Posts: 179
 

Default Re: Change width, center site & change background color

Hi, I cant seem to get this table centered. (see pic) Here is my code from bottom.tpl

I'm not to good at html yet.

<table width="100%" cellpadding="0" cellspacing="0">
<tr><td class="HeadThinLine"><img src="{$ImagesDir}/spacer.gif" class="Spc" alt="" /></td></tr>
<tr>
<td class="BottomBox">
<table width="100%" cellpadding="0" cellspacing="0"><tr>
<td class="Bottom" align="left">{include file="main/prnotice.tpl"}</td>
<td class="Bottom" align="right">{include file="copyright.tpl"}</td>

<div align="center">
<table width="431" border="0" cellspacing="2" cellpadding="2">
<tr>
<td><a href="../Moneybackguarantee.html"><img src="../images/Money-Back-Guarantee-smaller.gif" alt="SSL Certificate Authority" title="SSL Certificate Authority" height="74" width="75" align="absmiddle" border="0" /></a></td>
<td><img src="../images/paypalhorizontal_solution_PPeCheck.gif" alt="" height="58" width="223" align="middle" border="0"></td>
<td><img src="../images/PositiveSSL_tl_transsmaller.gif" alt="" height="75" width="75" border="0"></td>
<td><!-- Begin Official PayPal Seal --><a href="https://www.paypal.com/us/cgi-bin/webscr?cmd=_seal-entry&pal=support%403dnucleus%2ecom" target="_blank"><img src="../images/paypal_verified.gif" border="0" alt="Official PayPal Seal"></A><!-- End Official PayPal Seal --></td>
</tr>
</table>
<table width="394" border="0" cellspacing="2" cellpadding="0">
<tr>
<td>
<div align="center">
</table></tr>
</td>
</tr>
</table>

Thanks!
Attached Thumbnails
Click image for larger version

Name:	center me.jpg
Views:	105
Size:	76.6 KB
ID:	1394  
__________________
CDSEO PRO
4.1.11 PRO
Dynamic images by xcartmod.com
X-Cart CSSTemplate/Skin for v4.1.11 PRO
Reply With Quote
  #9  
Old 03-04-2009, 08:17 AM
 
joet joet is offline
 

Newbie
  
Join Date: Sep 2006
Posts: 7
 

Default Re: Change width, center site & change background color

I have been successful changing my site's width, centering it, and changing the background color. (in 4.2).

It's tricky because the developers have changed the way the html is coded. The "page-container" div contains the main section of the page and has a top margin that pushed it down the page. Then, at the end of the code, the header is defined with "absolute" positioning relative to the top left corner of the screen.

So if all you change is the CSS on the "page-container" div, you won't change the header at all. And I'm not enough of a whiz to get the header to be centered if it's not in the regular document flow.

So what I did was edit home.tpl and moved the header div up to just inside the page-container div. Like so:
HTML Code:
<div id="page-container"> <div id="header"> {include file="customer/head.tpl"} </div>
And then I had to adjust the height of the header in the main.css and remove the top margin on page-container.

Note: If you're using fast lane checkout you also have to change this in the home.tpl inside the FLC module, and change the FLC header height (it's at something like line 3250)

Hope that helps.

Sig line is outdated. Sorry about that.

Joe
__________________
version 4.1.9
Reply With Quote
  #10  
Old 03-04-2009, 08:22 AM
  buckyreal2's Avatar 
buckyreal2 buckyreal2 is offline
 

Member
  
Join Date: Jul 2003
Location: Minneapolis, Minnesota
Posts: 11
 

Default Re: Change width, center site & change background color

I was venting my frustration before... I'm better now.

What I did is create my own layout in CSS, and apply my styles to the page templates.

Reverse engineering the product layouts... not fun, but I'm getting there.
__________________
X-Cart 4.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 07:53 PM.

   

 
X-Cart forums © 2001-2020