Forums / Basic Configuration / Centering text on only some pages

Centering text on only some pages

Locked

Views: 1,256

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
17 Mar 2010, 3:30 AM
#1
blabay avatar

blabay

New Zenner

Join Date:
Mar 2010
Location:
Blaine, MN
Posts:
21
Plugin Contributions:
0

Centering text on only some pages

I figured out how to align text in the stylesheet, but it affects everything. How can I add code or edit stylesheet to change text aligment only in certain boxes/pages.
Keep in mind, I'm new at this so be gentle :wink:

http://natureselementsonline.com/store

17 Mar 2010, 9:39 AM
#2
stevesh avatar

stevesh

Black Belt

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

Re: Centering text on only some pages

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. A very handy tool.

The sideboxes, for example, have their own id's, so you would find, say, #information in the stylesheet (or add it if it doesn't exist). To change the header of that box would be #informationHeading, the content area would be #informationContent, etc.

CSS is case-sensitive.

17 Mar 2010, 12:58 PM
#3
blabay avatar

blabay

New Zenner

Join Date:
Mar 2010
Location:
Blaine, MN
Posts:
21
Plugin Contributions:
0

Re: Centering text on only some pages

When I updated FF to the newest version, the Web Developer plugin says its no longer compatible! I've been using Firebug anyway, but it doesn't seem to show me what I need. Maybe I'll have to add to the stylesheet like you say.
Thanks

18 Mar 2010, 3:52 AM
#4
blabay avatar

blabay

New Zenner

Join Date:
Mar 2010
Location:
Blaine, MN
Posts:
21
Plugin Contributions:
0

Re: Centering text on only some pages

I'm lost. Lets say I wanted to align all the content on the Contact Us main page to the left, but keep the header and sideboxes aligned center. Where do I add this in the css?

22 Mar 2010, 3:18 AM
#5
blabay avatar

blabay

New Zenner

Join Date:
Mar 2010
Location:
Blaine, MN
Posts:
21
Plugin Contributions:
0

Re: Centering text on only some pages

I figured it out, for the most part. The only page I wanted centered was the main page anyway. I just put it in the html for the main page. I figured out the css for the sideboxes.

7 Sep 2010, 8:07 PM
#6
elijah avatar

elijah

New Zenner

Join Date:
Jul 2006
Posts:
33
Plugin Contributions:
0

Re: Centering text on only some pages

blabay -
Can you expand on your findings? I am looking to center align my main page h1 only but I'm not sure where to do this. And what was the css code that you entered. Thanks... I'm ignorant about these things.

Elijah