Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trying to center a page

Status
Not open for further replies.

phrozt

IS-IT--Management
Jul 8, 2004
78
US
I'm having a huge brain fart and I can't figure out how to center my page. I'm making the width 600, but I want to center it so that it looks nice on a larger resolution.
 
Short answer:



two style definitions:

Code:
body {
    text-align: center;
}

#wrapper {
    width: 600px;
    margin: 0 auto;
}

then, wrap everything that's in between your [tt]<body>[/tt] and [tt]</body>[/tt] tags with this:

Code:
<div id="wrapper">
...
</div>

*cLFlaVA
----------------------------
[tt]a frickin' twelve-gauge, what do you think?[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
that did the trick.. I was afraid the text-align would make all my text centered.. but it didnt.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top