Forums / Templates, Stylesheets, Page Layout / Help! I cannot change the width of my (home) template

Help! I cannot change the width of my (home) template

Views: 1,545

Results 1 to 7 of 7
23 Jan 2014, 3:50 AM
#1
keithduong avatar

keithduong

New Zenner

Join Date:
Jan 2014
Location:
ottawa, ontario, canada
Posts:
18
Plugin Contributions:
0

Help! I cannot change the width of my (home) template

Hi,
I appreciate your help. No matter what I did, I could not change the width. I have modified the width in every one of these files without success:
-includes/templates/template_default/css/stylesheet.css;
-includes/templates/classic/css/stylesheet.css; and
-includes/templates/KQ/css/stylesheet.css.

#mainWrapper {
background-color: #ffffff;
text-align: left;
width: 960px;
/* width: 750px;*/
vertical-align: top;
border: 1px solid #9a9a9a;

What was wrong?

Thanks

23 Jan 2014, 5:13 AM
#2
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Help! I cannot change the width of my (home) template

Which override template do you have your cart set to use?
Classic or KQ?
Do you have other templates/modules installed that use alternate CSS stylesheets?

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

23 Jan 2014, 3:07 PM
#3
keithduong avatar

keithduong

New Zenner

Join Date:
Jan 2014
Location:
ottawa, ontario, canada
Posts:
18
Plugin Contributions:
0

Re: Help! I cannot change the width of my (home) template

twitchtoo:

Which override template do you have your cart set to use?
Classic or KQ?
Do you have other templates/modules installed that use alternate CSS stylesheets?

I am new to zen cart. I created the KQ folder as shown in the above hierachy. I assumed that creation would override the default system. Did I miss anything?

Regarding the use of other alternate CCS stylesheets, zen cart is set up as part of my website. But, I believe that the zen cart shop template should be governed by its own stylesheets. Is there a way to make sure that the shop template not affected by other stylesheets?

23 Jan 2014, 3:19 PM
#4
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Help! I cannot change the width of my (home) template

Here's how it works:
ZenCart is installed into your chosen directory preferably in the root folder, by default it uses /includes/templates/template_default.

If you have selected the 'Classic' template in Admin-> Tools-> Template Selection and if there are files in the includes/templates/classic folder - it will use those files 'overriding' the template_default files.

If any are missing from the classic folder it will continue to use the template_default files.

If you created the override template folder includes/templates/KQ and added in a new stylesheet.css the path would look like this:
includes/templates/KQ/css/stylesheet.css

Select the 'KQ' template in Admin-> Tools-> Template Selection
and it will use your new stylesheet.css.

You should not be changing any of the 'template_default' files, copy the files you want to change to the same respective locations in your template folders and everything will remain separate.

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

24 Jan 2014, 3:00 PM
#5
keithduong avatar

keithduong

New Zenner

Join Date:
Jan 2014
Location:
ottawa, ontario, canada
Posts:
18
Plugin Contributions:
0

Re: Help! I cannot change the width of my (home) template

Thank you very much for your help. I was able (somewhat) to modify the template width from 750px to 960px. When I went into Admin-> Tools-> Template Selection, I was presented with:

Template Language: Defaultt (All)
Template Name: Classic Contemporary Green
Template Directory: cllassic
Under Edit: (only one choice despite the creation of the KQ folder) : Classic Contemporary Green

However, from the above information, I was able to adjust the width in the classic/ccs/stylesheet.ccs and it woked.

A question: why did the system not see the KQ folder?
Another question: how do I make the template width vary according to the computer screen width opened?

Also, there is a couple of side effects, the header background image seemed to be:
Orginal image (750 px, starting from the left) + 1/2 orginal image (to make up for a total of 960px)
A question: how do I change the header background image according to the template width?

In addition, another question about the EZ-Pages header bar or the navigation bar (the bar below the header login bar), I added 6 links/buttons to this bar. The position of the last, final link is on a second row and there is still plenty of space on the first one.
A question: how do I set all 6 links on the same row?

Once again, thank you very much for your help.

24 Jan 2014, 3:12 PM
#6
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Help! I cannot change the width of my (home) template

The system doesn't automatically 'see' override folders. Zencart builds the dropdown list in Admin - Tools - Template Selection from the template_info.php files in the respective template main folders. See that file in the Classic template folder for more information.

http://www.zen-cart.com/content.php?180-how-do-i-create-a-new-custom-template

A link to your site would help us answer your other questions.

24 Jan 2014, 3:29 PM
#7
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Help! I cannot change the width of my (home) template

keithduong, It looks like you have some odds and ends in your cart... Here are some answers:

Template Language: Defaultt (All)
Template Name: Classic Contemporary Green
Template Directory: cllassic
Under Edit: (only one choice despite the creation of the KQ folder) : Classic Contemporary Green

However, from the above information, I was able to adjust the width in the classic/ccs/stylesheet.ccs and it woked.

A question: why did the system not see the KQ folder?
•** When you add a new template, there are other files that need to be added for the admin to 'see' the template... then select and use it.
• includes/templates/YOUR_TEMPLATE/template_info.php
**
Another question: how do I make the template width vary according to the computer screen width opened?
•
You'll need to change the fixed container width to 100%.

Also, there is a couple of side effects, the header background image seemed to be:
Orginal image (750 px, starting from the left) + 1/2 orginal image (to make up for a total of 960px)
A question: how do I change the header background image according to the template width?
• Change the image size itself then change the containing box in CSS and finally adjust the size here: includes/languages/english/YOUR_TEMPLATE/header.php

In addition, another question about the EZ-Pages header bar or the navigation bar (the bar below the header login bar), I added 6 links/buttons to this bar. The position of the last, final link is on a second row and there is still plenty of space on the first one.
A question: how do I set all 6 links on the same row?
• Depends on the CSS width for that particular navigation bar in your stylesheet.css

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian