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

How To Center All Pages

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-07-2008, 03:41 PM
 
doersam@hotmail.com doersam@hotmail.com is offline
 

Senior Member
  
Join Date: Jul 2004
Location: Snohomish, WA
Posts: 153
 

Question How To Center All Pages

I am developing a site that needs to be centered on all pages instead of using the entire width of the user's sceen. I found one post that helped but I am at a loss as to making ALL pages centered with white space (or whatever color) on both side.

Thank you for your help!
__________________
Thanks,
Phil

X-Cart Gold
Version 4.4.5
Reply With Quote
  #2  
Old 04-07-2008, 04:35 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: How To Center All Pages

One way to do this:

in your css file:

Code:
TABLE.Container { width: 960px; margin-left: auto; margin-right: auto; background-color: #FFFFFF; }

By using margin-left: auto and margin-right: auto, whatever is NOT specified for the container width is essentially centered.

Try it with a low width setting (800)- then try it with 960 (which is great for a 1024 screen).

Helpful?
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #3  
Old 04-07-2008, 05:02 PM
 
doersam@hotmail.com doersam@hotmail.com is offline
 

Senior Member
  
Join Date: Jul 2004
Location: Snohomish, WA
Posts: 153
 

Default Re: How To Center All Pages

I made the change to the skin1.css file but there was no noticable change.

What could I be missing?
__________________
Thanks,
Phil

X-Cart Gold
Version 4.4.5
Reply With Quote
  #4  
Old 04-07-2008, 05:17 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: How To Center All Pages

Quote:
What could I be missing?

A skin that utilizes the container class? What skin are you using?
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #5  
Old 04-07-2008, 05:44 PM
 
doersam@hotmail.com doersam@hotmail.com is offline
 

Senior Member
  
Join Date: Jul 2004
Location: Snohomish, WA
Posts: 153
 

Default Re: How To Center All Pages

Its a skin from aheadWorks:
http://x-cart-customization.com/shop/product.php?productid=12&cat=0&page=1

Thank you for your help.
__________________
Thanks,
Phil

X-Cart Gold
Version 4.4.5
Reply With Quote
  #6  
Old 04-07-2008, 05:56 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: How To Center All Pages

Quote:
Its a skin from aheadWorks:
http://x-cart-customization.com/shop...2&cat=0&page=1

Well there you go... this skin uses a width 100% from line 1 of the body. You need to look into home.tpl (and anything nested) and see what this skin is trying to do.

The fact that it over-writes the container is pretty nasty... looks good, but is not utilizing css well.

Good luck.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #7  
Old 04-07-2008, 06:30 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: How To Center All Pages

PS-- your new skin doesn't validate. I wouldn't buy a skin that doesn't pass xhtml validation

image tags not closed
br tags not closed
BUNCHES of other stuff that is simply not xhtml compliant.

AS COMPARED TO:
x-cart demo store

or

http://www.xcartmods.co.uk/demos/xcm/


There is no excuse for a PURCHASED skin to fail validation in version 4.1.9
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #8  
Old 04-08-2008, 04:23 PM
 
doersam@hotmail.com doersam@hotmail.com is offline
 

Senior Member
  
Join Date: Jul 2004
Location: Snohomish, WA
Posts: 153
 

Default Re: How To Center All Pages

Thanks for the excellent feedback.

I have emailed aheadWorks for a working version of the skin or a refund. I'll let you know how it goes
__________________
Thanks,
Phil

X-Cart Gold
Version 4.4.5
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:19 PM.

   

 
X-Cart forums © 2001-2020