Forums / Templates, Stylesheets, Page Layout / Trying to centre site on screen

Trying to centre site on screen

Locked

Views: 796

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
27 Aug 2009, 3:34 PM
#1
m_young avatar

m_young

New Zenner

Join Date:
Aug 2009
Location:
Brisbane, Australia
Posts:
5
Plugin Contributions:
0

Trying to centre site on screen

Hi,

I am relatively new to Zen Cart, so I apologise in advance!

I am trying to centre my site on the screen - at the moment it is left aligned.

I assume it is in the CSS that I have to make the changes but I am not sure what element to centre.

my site is https://www.palletkings.com.au/zen

your help is appreciated.

Regards
Mark

ps I did try to search the forums first but could not find the answer..

Mark
www.palletkings.com.au/zen
Gowing old is mandatory, growing up is optional...

27 Aug 2009, 3:51 PM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: Trying to centre site on screen

/*wrappers - page or section containers*/
#mainWrapper {
	background-color: #ffffff;
	text-align: left;
	width: 750px;
	vertical-align: top;
	border: 1px solid #9a9a9a;
	float: center;
	}

#headerWrapper, #contentMainWrapper, #logoWrapper, #cartBoxListWrapper, #ezPageBoxList, #cartBoxListWrapper ul, #ezPageBoxList ul, #mainWrapper, #popupAdditionalImage, #popupImage {
	margin: 0em;
	padding: 0em;
	}
```float: center; is not a valid property value - you can use left, right or none.
margin: auto; will do what you want.
The #mainWrapper in the second rule makes the margin override the setting in the first rule. Remove #mainWrapper, from the second one.

/wrappers - page or section containers/
#mainWrapper {
background-color: #ffffff;
text-align: left;
width: 750px;
vertical-align: top;
border: 1px solid #9a9a9a;
margin: auto;
}

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

27 Aug 2009, 4:05 PM
#3
m_young avatar

m_young

New Zenner

Join Date:
Aug 2009
Location:
Brisbane, Australia
Posts:
5
Plugin Contributions:
0

Re: Trying to centre site on screen

Thank you so much for your prompt & extremely helpful reply.

Cheers & thanks again
Much appreciated.

Mark

Mark
www.palletkings.com.au/zen
Gowing old is mandatory, growing up is optional...