Centering All Pages

Locked
Results 1 to 5 of 5
This thread is locked. New replies are disabled.
10 Nov 2009, 17:57
#1
jay_gee avatar

jay_gee

New Zenner

Join Date:
Sep 2009
Posts:
48
Plugin Contributions:
0

Centering All Pages

Greetings to the list! Sorry for cross-posting but I was
unable to locate an answer to this question in either sub-forum
and believe it is appropriate to both.

I am using version 1.3.8a.

I am interested in centering all ZC pages in the
browser window.

By pages, I refer to content generated and placed within

<div class="mainWrapper"

I have placed centering tags before and after this <div container
but they seem to have no effect.

Question:

Is this a

1.) stylesheet issue, or a
2.) template customization issue?

If a stylesheet issue, what method best accomplishes this?

If a template customization issue, what solution works best in
this case?

Thanks!
10 Nov 2009, 19:25
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Posts:
21,876
Plugin Contributions:
6

Re: Centering All Pages

It is a stylesheet issue. Using HTML <center> tags is an antiquated method; for standard template setups, you would add to the #mainWrapper {} rule in your stylesheet

margin: auto;

If this doesn't work for you, post a link to see your site live so we can give accurate advice.
11 Nov 2009, 00:33
#3
jay_gee avatar

jay_gee

New Zenner

Join Date:
Sep 2009
Posts:
48
Plugin Contributions:
0

Re: Centering All Pages

gjh42:

It is a stylesheet issue. Using HTML <center> tags is an antiquated method; for standard template setups, you would add to the #mainWrapper {} rule in your stylesheet

margin: auto;

If this doesn't work for you, post a link to see your site live so we can give accurate advice.


GJH,

Thanks for replying.

The rules for the mainWrapper <div are set to provide a bordered container that occupies 90% of the window's width. Margins are set within the border to allow for centered tables, headlines, etc.

My desire is to center everything in the <body, e.g., the mainWrapper <div container.

Thanks. Can't post a link right now as the site is closed to public access.
11 Nov 2009, 01:21
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Posts:
21,876
Plugin Contributions:
6

Re: Centering All Pages

So, did you add margin: auto; to the #mainWrapper {} rule?

If you can't even show us the down for maintenance view, post the applicable stylesheet rules as you have them, so we have some idea of how you have set it up.
11 Nov 2009, 02:46
#5
jay_gee avatar

jay_gee

New Zenner

Join Date:
Sep 2009
Posts:
48
Plugin Contributions:
0

Re: Centering All Pages

gjh42:

So, did you add margin: auto; to the #mainWrapper {} rule?


Glenn:

Thanks for your suggestions. margin: auto; when added to the #mainWrapper rules did not solve the problem.

Turns out there was a second reference to #mainWrapper lower in stylesheet.css that had had margin: 0;, which caused a set of problems all its own.

All is well now.

Thanks again.

Jay