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)
-   -   How To Center All Pages (https://forum.x-cart.com/showthread.php?t=38889)

doersam@hotmail.com 04-07-2008 03:41 PM

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!

carpeperdiem 04-07-2008 04:35 PM

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?

doersam@hotmail.com 04-07-2008 05:02 PM

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?

carpeperdiem 04-07-2008 05:17 PM

Re: How To Center All Pages
 
Quote:

What could I be missing?


A skin that utilizes the container class? What skin are you using?

doersam@hotmail.com 04-07-2008 05:44 PM

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.

carpeperdiem 04-07-2008 05:56 PM

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.

carpeperdiem 04-07-2008 06:30 PM

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

doersam@hotmail.com 04-08-2008 04:23 PM

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 :-)


All times are GMT -8. The time now is 04:35 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.