Re: centering web site pages



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


.



Relevant Pages

  • Re: centering web site pages
    ... I want to create a web site that is centred, ... Any ideas how this is accomplished, or are there any editors that can ... browser window. ... A dynamic design which adjusts to the browser width has a ...
    (alt.html)
  • Re: Center web page info
    ... Honestly, I imagine they're applying CSS styles to DIV and TABLE tags, but ... web site to work like MySpace.com where the page content remains ... centered when I resize the browser window. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Issues with multiple website development on Windows 2000 pro box
    ... Can;t you have all the projects running under the same IIS web site? ... > project A to edit and I then click on the run button and a browser window ... I close down the IDE and I go ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Wb site BOLDED words appear smudged or unclear - How to cener objects
    ... > I had to change the design of my web site since the words that I wanted to ... publisher document and then click the center text button to center text ... the document area, not the browser window. ... No version supports centering ...
    (microsoft.public.publisher.webdesign)
  • re: jumbled web page layout when viewed or designed on one computer but not othe
    ... sensitive to the width of the browser window. ... >I am working on my web site on my laptop. ... >of but nothing has changed the jumble. ...
    (microsoft.public.frontpage.client)