Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Why I can't set the width of the template?

Why I can't set the width of the template?

Locked

Views: 1,536

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
24 Jul 2006, 6:12 PM
#1
test100 avatar

test100

New Zenner

Join Date:
May 2004
Posts:
6
Plugin Contributions:
0

Why I can't set the width of the template?

I just installed zencart 1.3, and I tried to set the width to 100%, but it seems to me that no matter how I change to value of the width in stylesheet.css, it simply stays - I guess - 750px.

#mainWrapper {
background-color: #ffffff;
text-align: left;
width: 100%;
vertical-align: top;
}

Is there another file that needs to be changed?
Can somebody help me out?

24 Jul 2006, 11:36 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Why I can't set the width of the template?

What's your URL?
What template are you working from?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

25 Jul 2006, 12:07 AM
#3
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Why I can't set the width of the template?

test100:

I just installed zencart 1.3, and I tried to set the width to 100%, but it seems to me that no matter how I change to value of the width in stylesheet.css, it simply stays - I guess - 750px.

#mainWrapper {
background-color: #ffffff;
text-align: left;
width: 100%;
vertical-align: top;
}

Is there another file that needs to be changed?
Can somebody help me out?As you have just installed v1.3 you have probably defaulted to the Classic Template. This has two stylesheets _new and _original and the page width is set in both. Your mainWrapper (which you will be setting to 100% in _new is expanding. But just inside it is a table (centershop) also width 750px set in _original.

This is just a taster of the problems that you will have using the Classic Template. This template is intended primarily for backward compatibility with earlier versions of Zen Cart and has been hacked about somewhat to achieve this making for a rather more complex stylesheet than a new site needs and more tables-based layout than is the case for a completely clean installation based on the template_default.

It would be better to build your own template from scratch based on the functionality in the template_default (which has width 100%). A little more work up front, but much, much easier in the long-term.

If that seems a bit overwhelming, an alternative is to start from the Future Zen template which engages template_default for you and amend that. You can download it from the downloads section of this site and there's a link to the relevant downloads page in my signature below.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

26 Jul 2006, 8:13 PM
#4
test100 avatar

test100

New Zenner

Join Date:
May 2004
Posts:
6
Plugin Contributions:
0

Re: Why I can't set the width of the template?

Thank you very much, Kuroi.

After making a change in stylesheet_original.css (in includes/templates/classic/css)

.centershop {
padding: 0px;
margin: 0px auto;
/position: relative;/
text-align: left;
width: 100% !important;

now it's set to 100%.

I'll also try future zen template.

I appreciate your help.

26 Jul 2006, 11:41 PM
#5
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Why I can't set the width of the template?

Well behaved templates (and future Zen is very well behaved) should not interfer with each other, so you should be able to try several and just switch between then in the Admin until you find a jumping off point you like. I recommend finding one built on the template_default (will have a single stylesheet) with minimal use of tables.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)