Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Centering the footer?

Centering the footer?

Views: 1,473

Results 1 to 9 of 9
23 Dec 2010, 5:19 AM
#1
cchan avatar

cchan

Zen Follower

Join Date:
Oct 2010
Posts:
121
Plugin Contributions:
0

Centering the footer?

Hi, could someone please tell me how to center the page footer? I've tried codes such as <center> and align:"center" .

Here's the link to the site if required.http://oembargain.com

Thanks in advance!

23 Dec 2010, 6:52 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Centering the footer?

Looks centered

23 Dec 2010, 7:17 AM
#3
gjh42 avatar

gjh42

Black Belt

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

Re: Centering the footer?

Do you mean the footer, or the text "in" the footer? You have this

<ul class="footer-links list-style-none float-right">

which is moving the whole list to the right.

23 Dec 2010, 4:01 PM
#4
cchan avatar

cchan

Zen Follower

Join Date:
Oct 2010
Posts:
121
Plugin Contributions:
0

Re: Centering the footer?

Sorry, I meant the text in the footer. I just changed it to

<ul class="footer-links list-style-none float-center"> and now it's bearing closer to the left...
23 Dec 2010, 6:25 PM
#5
gjh42 avatar

gjh42

Black Belt

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

Re: Centering the footer?

The text in that snippet is just classnames, not style rules, and there is neither a rule in the stylesheet for .float-center {} nor a valid property float: center; .

What you have effectively done is delete the float-right class, which is good.
The next thing to do is add to
stylesheet.css (line 357)
#navSuppWrapper {
border-top: 2px solid #CECECE;
margin: 25px 0 0;
padding: 12px 0;
text-align: center;
}

and change
stylesheet.css (line 380)
.footer-links li {
display: inline;
font: 11px verdana;
margin: 0 2px 0 14px;
}

23 Dec 2010, 6:30 PM
#6
cchan avatar

cchan

Zen Follower

Join Date:
Oct 2010
Posts:
121
Plugin Contributions:
0

Re: Centering the footer?

Thank you very much, that worked great!

12 Mar 2011, 2:10 AM
#7
pullingouthair avatar

pullingouthair

New Zenner

Join Date:
Mar 2011
Posts:
30
Plugin Contributions:
0

Re: Centering the footer?

Not sure if I should start a new thread. Forgive and correct me if I am wrong. I am trying to figure the same thing out.

.footer-links li {
	font: normal 11px verdana;
	float: left;
	margin: 0 2px 0 2px;
	text-align: center;

}

#navMain ul li a, #navCatTabs ul li a {
	text-decoration: none;
	padding: 0em 0.5em;
	margin: 0;
	color: #ffffff;
	white-space: nowrap;
	}
.legalCopyright {
	float: left;
        text-align: center;
	font: 11px verdana !important;
	line-height: 16px !important;
}

If I take out the float left, both lines run together. The links and the copyright powered by zen cart lines.

All help is appreciated.

12 Mar 2011, 4:24 AM
#8
usr50 avatar

usr50

Zen Follower

Join Date:
Mar 2009
Location:
Niagara Ontario
Posts:
136
Plugin Contributions:
0

Re: Centering the footer?

the classes will inherit the properties of the element they belong to. i.e. if you have a 'footer div' with a 'text -align: center' you have it covered.

many stylesheets begin with the Body element styled with 'text-align:center ' and then a webmaster need only apply "text-align:right or left " per child elements required.
so start out centered and avoid styling every cotton pickin' character in the page. which causes great CHAOS in a page.

15 Mar 2011, 8:31 PM
#9
pullingouthair avatar

pullingouthair

New Zenner

Join Date:
Mar 2011
Posts:
30
Plugin Contributions:
0

Re: Centering the footer?

usr50:

the classes will inherit the properties of the element they belong to. i.e. if you have a 'footer div' with a 'text -align: center' you have it covered.

many stylesheets begin with the Body element styled with 'text-align:center ' and then a webmaster need only apply "text-align:right or left " per child elements required.
so start out centered and avoid styling every cotton pickin' character in the page. which causes great CHAOS in a page.

I would like that to work but for now it doesnt. Will have to figure it out.