Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Style Sheet Or No... I want to CENTER Cart.

Style Sheet Or No... I want to CENTER Cart.

Locked

Started by lee_captivemoon_com on 16 Nov 2006, 4:51 PM · Views: 1,925

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
16 Nov 2006, 4:51 PM
#1
lee_captivemoon_com avatar

lee_captivemoon_com

New Zenner

Join Date:
Nov 2006
Posts:
22
Plugin Contributions:
0

Post #1 by lee_captivemoon_com

Well, I am using the template: gloss_blue which was built to fill the page. I found where to change the width of the page, but no matter where I change it I can not make my cart CENTERED on the page:

This is a link to my cart:
http://freenetworkinginternational.com/Cart/

This is my stylesheet:

body {
font-family: verdana, arial, helvetica, sans-serif;
font-size: 62.5%;
color: #000000;
background-color: #ffffff;
width: 800px;
float: center;
}

/wrappers - page or section containers/
#mainWrapper {
background-color: #FFFFFF;
text-align: left;
vertical-align: top;
float: middle;
border: 1px solid #000000;
size: 800px;
float: center;
margin: auto;
}

Anyone have any ideas?
Thanks!

Totally Lost Lee :)

16 Nov 2006, 5:43 PM
#2
blindside avatar

blindside

Totally Zenned

Join Date:
Sep 2004
Posts:
1,237
Plugin Contributions:
1

Post #2 by blindside

There is no float:center definition. Instead, you must set the margins to auto, like so:

margin:0px auto;

The 0px defines the top and bottom, while left and right are auto. Alternatively, if you want to do something with the top and bottom, you can use this CSS definition set:

margin-left: auto;
margin-right: auto;

Frank Koehl
"Cleverly Disguised as a Responsible Adult"

frankkoehl.com

16 Nov 2006, 5:52 PM
#3
lee_captivemoon_com avatar

lee_captivemoon_com

New Zenner

Join Date:
Nov 2006
Posts:
22
Plugin Contributions:
0

Post #3 by lee_captivemoon_com

That did it! I have been trying to do that for 3 days!

Thank you so much!

:smartass: Lee

16 Nov 2006, 7:15 PM
#5
lee_captivemoon_com avatar

lee_captivemoon_com

New Zenner

Join Date:
Nov 2006
Posts:
22
Plugin Contributions:
0

Post #5 by lee_captivemoon_com

And here I was search the support forums....

Thanks again!

17 Nov 2006, 4:59 AM
#6
blindside avatar

blindside

Totally Zenned

Join Date:
Sep 2004
Posts:
1,237
Plugin Contributions:
1

Post #6 by blindside

Forum for Zen Cart-specific questions. Google for everything else.

Frank Koehl
"Cleverly Disguised as a Responsible Adult"

frankkoehl.com

17 Nov 2006, 5:18 AM
#7
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,846
Plugin Contributions:
0

Post #7 by barco57

would not margin: auto; have worked just as well rather than setting left and right?

edit: set left and right so as not to mess with top/bottom.......right?

Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!

17 Nov 2006, 2:30 PM
#8
blindside avatar

blindside

Totally Zenned

Join Date:
Sep 2004
Posts:
1,237
Plugin Contributions:
1

Post #8 by blindside

@Barco: Right (to your additional edit comment). If you don't want the top and bottom to be 'auto' as well (thus making the page horizontally and vertically centered), you can define them independently in the same "margin" call, or use the totally separate margin-left and margin-right.

Personally I usually prefer the separate calls because they allow me more fine-grained control, and I hate rewriting CSS.

Frank Koehl
"Cleverly Disguised as a Responsible Adult"

frankkoehl.com

20 Dec 2008, 4:13 PM
#9
dynamicduo avatar

dynamicduo

New Zenner

Join Date:
Dec 2008
Posts:
10
Plugin Contributions:
0

Post #9 by dynamicduo

I want my cart positioned left. I already got the mainwrapper left, but I need

banner header position1 positioned left &
Banner footer position3 positioned left.

where in the css can I find that?

20 Dec 2008, 5:04 PM
#10
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #10 by gjh42

You can answer your own question by installing the Firefox Web Developer extension, and using the Information > Display Element Information button to find class/id tags for any page element you are interested in.

If the class/id is not already mentioned in the stylesheet, you can add it.