Forums / Templates, Stylesheets, Page Layout / How do I change the width of my template?

How do I change the width of my template?

Started by pgram on 26 Jan 2012, 11:38 PM · Views: 1,587

Results 1 to 8 of 8
26 Jan 2012, 11:38 PM
#1
pgram avatar

pgram

New Zenner

Join Date:
Jan 2012
Posts:
12
Plugin Contributions:
0

How do I change the width of my template?

I bought the Zen Cart eBook 2nd edition and followed the steps and information from pages 282 "Creating Custom Templates" through 286. I have been through the book and Wiki site, Top 10 Questions asked by new Zen Cart® Users, I still cannot figure out how to change the width of the entire page. I have managed to find how/where to change the images and text, but cannot find anything (particularly in the .css) where I can call out a value. Ideally I would like a page that is 900px wide. But for the life of me, I can't find where to make that happen. Can anyone please help? I've already spent a day, just on this one thing. :(

Thanks in advance!

26 Jan 2012, 11:53 PM
#2
pgram avatar

pgram

New Zenner

Join Date:
Jan 2012
Posts:
12
Plugin Contributions:
0

Re: How do I change the width of my template?

I found the answer!!! :blush: It is on the stylesheet.css, specifically this for those like me who have never worked with anything but basic HTML:
/wrappers - page or section containers/
#mainWrapper {
background-color: #ffffff;
text-align: left;
width: 900px;
vertical-align: top;
border: 1px solid #9a9a9a;
}

The default width is 750px; Change the number and you change the width of the page column! :clap: I guess I should have spent a few more minutes looking before I posted.:oops:

27 Jan 2012, 2:23 AM
#3
rescoccc avatar

rescoccc

Totally Zenned

Join Date:
May 2010
Location:
WA State
Posts:
1,700
Plugin Contributions:
2

Re: How do I change the width of my template?

You can also use a percentage so that the width expands and contracts to fit the visitor's monitor.

The best way to learn is to try stuff. But, back it up first.

27 Jan 2012, 1:22 PM
#4
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: How do I change the width of my template?

RescoCCC:

You can also use a percentage so that the width expands and contracts to fit the visitor's monitor.
IF the rest of your template is designed to utilize that extra width in a sensible manner. And IF you test the result on a large monitor at a variety of different browser window widths (and in different browsers, of course) to make sure the result is what you expect. Jus' sayin'.

Rob

Breakfast: the most important donut of the day.

27 Jan 2012, 6:14 PM
#5
pgram avatar

pgram

New Zenner

Join Date:
Jan 2012
Posts:
12
Plugin Contributions:
0

Re: How do I change the width of my template?

Rob,

Your artcardshop.com site is BEAUTIFUL. How long did it take you to get that look? The text and navigation is simple and EASY to read! I don't mind a few boxes in the left and right columns to highlight something special, but your layout is configured beautifully. I am making the assumption that you did more than change a few templates and stylesheets. After seeing your site and knowing how long I have already spent on trying to get the one I am working on to look halfway decent, I now feel totally dejected!

Pam

27 Jan 2012, 7:21 PM
#6
rescoccc avatar

rescoccc

Totally Zenned

Join Date:
May 2010
Location:
WA State
Posts:
1,700
Plugin Contributions:
2

Re: How do I change the width of my template?

rstevenson:

IF the rest of your template is designed to utilize that extra width in a sensible manner. And IF you test the result on a large monitor at a variety of different browser window widths (and in different browsers, of course) to make sure the result is what you expect. Jus' sayin'.

Rob

I haven't seen any templates that have any problem with using a percentage in the mainWrapper width since all the template files use mainWrapper.

The best way to learn is to try stuff. But, back it up first.

27 Jan 2012, 8:17 PM
#7
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: How do I change the width of my template?

RescoCCC:

I haven't seen any templates that have any problem with using a percentage in the mainWrapper width since all the template files use mainWrapper.
I wasn't saying there would be a problem. I was saying that you needed to check to make sure the site looked the way you expected in lots of different-sized browser windows.

Rob

Breakfast: the most important donut of the day.

27 Jan 2012, 8:18 PM
#8
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: How do I change the width of my template?

pgram:

... Your artcardshop.com site is BEAUTIFUL. ...
Thanks for the kind words Pam. I'll PM you the details.

Rob

Breakfast: the most important donut of the day.