Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Shrinking centre column and adding sidebox margins

Shrinking centre column and adding sidebox margins

Locked

Views: 897

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
17 Mar 2009, 9:04 AM
#1
yz250 avatar

yz250

New Zenner

Join Date:
Dec 2008
Location:
Canberra, Australia
Posts:
83
Plugin Contributions:
0

Shrinking centre column and adding sidebox margins

Hi everyone. I have a few things I need to achieve and they will be evident once you view my site (link below).

  1. I want to decrease the centre column width to 550px whilst maintaing the left and right columns at the stock 150px

  2. I want to pad/margin the left column from the left of my page, and my right column from the right of my page. I managed to get the left column to do what I want by adding margin-left: 25px; to my stylesheet. Cant figure out how to do it on the right though.

  3. after adding the margin to my left sidebox container, its now overlapping the centrecolumn text. I want to fix that.

Thanks in advance.

https://www.sgtpepper.com.au/store/

(basically im making this store appear the same as my original site - https://www.sgtpepper.com.au)

17 Mar 2009, 9:23 AM
#2
kuroi avatar

kuroi

Totally Zenned

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

Re: Shrinking centre column and adding sidebox margins

The width of the centre column is what's left over after the side columns have been subtracted from the site width. So to achieve what you want, you will need to make the side columns wider, even if you choose not to fill all the wiodth with content.

17 Mar 2009, 9:28 AM
#3
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Shrinking centre column and adding sidebox margins

remove 25px margin that you have added to your style.

then go to admin
Configuration > Layout Setting .

then set both
Column Width - Left
Column Width - right

to 200px . this should fix the margins and wont overlap on centre column .

hope this helps.

17 Mar 2009, 9:30 AM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: Shrinking centre column and adding sidebox margins

The center column takes whatever width is left after the sidebars display, so set the #mainWrapper width to the desired total of center + sides.

You added margin-left: 25px; to
.leftBoxContainer {
border: 0px solid #FCF9C6;
margin-top: 0em;
margin-left: 25px;
}

so you can do the same (reversed) for .rightBoxContainer.

The reason for the overlap is that you have specified the sidebars to be 150px wide, then you want the sideboxes to be 150px wide plus a 25px margin and still fit in the sidebar. They won't do it - they spill over. Make the sidebars equal the total including box margins.

17 Mar 2009, 9:41 AM
#5
yz250 avatar

yz250

New Zenner

Join Date:
Dec 2008
Location:
Canberra, Australia
Posts:
83
Plugin Contributions:
0

Re: Shrinking centre column and adding sidebox margins

Thanks everyone. That worked like a charm.

Now, to add 10px margin to the top of my banner I altered the following style.

#headerWrapper, #contentMainWrapper, #logoWrapper, #cartBoxListWrapper, #ezPageBoxList, #cartBoxListWrapper ul, #ezPageBoxList ul, #mainWrapper, #popupAdditionalImage, #popupImage {
margin: 0em;
padding: 0em;
}

It worked, but I was just wondering what the proper way of seperating this is if I just want to add 10px to the headerWrapper tag and not all those other tags?

Thanks very much for the prompt help.

Brendan

17 Mar 2009, 9:47 AM
#6
gjh42 avatar

gjh42

Black Belt

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

Re: Shrinking centre column and adding sidebox margins

#headerWrapper {
    margin: 10px 0 0 0;
    padding: 0em;
    }

#contentMainWrapper, #logoWrapper, #cartBoxListWrapper, #ezPageBoxList, #cartBoxListWrapper ul, #ezPageBoxList ul, #mainWrapper, #popupAdditionalImage, #popupImage {
    margin: 0em;
    padding: 0em;
    }
17 Mar 2009, 10:35 AM
#7
yz250 avatar

yz250

New Zenner

Join Date:
Dec 2008
Location:
Canberra, Australia
Posts:
83
Plugin Contributions:
0

Re: Shrinking centre column and adding sidebox margins

Thanks heaps for that.

Brendan