Zen Cart Logo

Centering Main Page

Views: 895

Results 1 to 4 of 4
28 Nov 2011, 8:09 PM
#1
mysh avatar

mysh

New Zenner

Join Date:
Nov 2011
Posts:
54
Plugin Contributions:
0

Centering Main Page

I know this is pretty basic but it has given me a hard time for some time now.

I just want the text on the main page center area to be centered. WHen I use html center command in define pages for main_page, it just moves the text about a 1/4 inch to the right, but no where near center.

Is there something I am missing about the layout that makes the right side of that area off limits or not treated as the main_page area?

here is the site

http://gator1736.hostgator.com/~peimei/

28 Nov 2011, 8:22 PM
#2
stevesh avatar

stevesh

Black Belt

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

Re: Centering Main Page

Try adding the red part in stylesheet.css:

#home-text{font-size:120%;width:550px; margin: auto; }

For future reference, install the Firefox browser and the Web Developer plugin for Firefox. You can use those to see where in the stylesheet you change the styling of the various page elements.

Ctrl-Shift-Y will allow you to hover over a section of the page and see the class and id names for that section in the box at the top. The statements in the stylesheet that begin with # are id's and the ones that begin with dots are classes.

Ctrl-Shift-E will open the CSS editor and allow you to edit the stylesheet and see the changes in real time without changing anything permanently. An essential tool.

Some prefer Firebug, which does much the same thing.

(If you're using Firefox 4-8, you'll need to remap the editor shortcut, since Firefox has appropriated Ctrl-Shift-E for an internal function - I use Ctrl-Shift-Q.)

28 Nov 2011, 9:03 PM
#3
mysh avatar

mysh

New Zenner

Join Date:
Nov 2011
Posts:
54
Plugin Contributions:
0

Re: Centering Main Page

Thanks for the reply. I have the developer tool installed and most the time it helps me to figure out the issue, but sometimes I can't put it together. Still in the early stages with css and zen cart.

My other issue is trying to change the text size on the information pages. I've been able to change it but it changes too much on the site. I need it to just change the info pages.
I am thinking I will have to enter some font code for each page.

29 Nov 2011, 11:45 AM
#4
stevesh avatar

stevesh

Black Belt

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

Re: Centering Main Page

You'd have to write rules in the stylesheet for each page, like #shippingInfoMainContent, #aboutUsMainContent, etc. if you want the text size different on each.

Also, you've used your privacy page for another purpose, which would be better on an EZ page. Many people won't do business with a site that doesn't spell out its privacy policy.