HighDots Forums  

center the page

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss center the page in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ashkaan57@hotmail.com
 
Posts: n/a

Default center the page - 09-20-2006 , 02:37 PM






Hi,
simpe question: How do I center the page (everything between <body> and
</body>)?
I tried using margin but it depends on the screen resolution,
text-align seems to center everything, including the texts.

Thanks.


Reply With Quote
  #2  
Old   
Chris F.A. Johnson
 
Posts: n/a

Default Re: center the page - 09-20-2006 , 03:10 PM






On 2006-09-20, ashkaan57 (AT) hotmail (DOT) com wrote:
Quote:
Hi,
simpe question: How do I center the page (everything between <body> and
/body>)?
I tried using margin but it depends on the screen resolution,
text-align seems to center everything, including the texts.
body {
width: 80%; /* adjust to taste; do not use fixed px width */
margin: auto;
}

--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)


Reply With Quote
  #3  
Old   
ashkaan57@hotmail.com
 
Posts: n/a

Default Re: center the page - 09-20-2006 , 04:31 PM




Chris F.A. Johnson wrote:
Quote:
On 2006-09-20, ashkaan57 (AT) hotmail (DOT) com wrote:
Hi,
simpe question: How do I center the page (everything between <body> and
/body>)?
I tried using margin but it depends on the screen resolution,
text-align seems to center everything, including the texts.

body {
width: 80%; /* adjust to taste; do not use fixed px width */
margin: auto;
}

--
Chris F.A. Johnson <http://cfaj.freeshell.org
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Thanks a lot.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.