Reply to Re: centering web site pages

Your name:

Reply:


Posted by Rik on 07/13/06 13:34

Brian Cryer wrote:
> "Lee" <lee__2k@hotmail.com> wrote in message
> news:1152789273.292610.162330@m73g2000cwd.googlegroups.com...
>> 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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация