Re: centering web site pages
- From: "Rik" <luiheidsgoeroe@xxxxxxxxxxx>
- Date: Thu, 13 Jul 2006 15:34:02 +0200
Brian Cryer wrote:
"Lee" <lee__2k@xxxxxxxxxxx> wrote in message
news:1152789273.292610.162330@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I want to create a web site that is centred, something like;-
http://www.xbox-scene.com/
Any ideas how this is accomplished, or are there any editors that can
do
this?
Stick everything inside a div and center that. So something along the
lines of:
<body>
<div style="text-align:center">
<p>Some content ...</p>
</div>
</body>
the site you gave as an example has a fixed width design (860pixels
wide), which means it sticks to the same width regardless of the size
of the browser window. A dynamic design which adjusts to the browser
width has a number of advantages over this (plus some disadvantages).
For a fixed size, I'd:
html, body{
width:100%;
text-align: center; #only necessary for MSIE
}
#page{
width: 760px;
margin: 0 auto;
text-align: left;
}
<body>
<div id="page">
</div>
</body>
Grtz,
--
Rik Wasmus
.
- References:
- centering web site pages
- From: Lee
- Re: centering web site pages
- From: Brian Cryer
- centering web site pages
- Prev by Date: Re: centering web site pages
- Next by Date: Re: Problem with list-style-type IE6
- Previous by thread: Re: centering web site pages
- Next by thread: Re: centering web site pages
- Index(es):
Relevant Pages
|