...

View Full Version : centering



java_freak
11-19-2009, 03:33 AM
hi!!
can some1 tel me how to center a web document? likem the page should expan and contract when the browser window is resized..
thanks..

Excavator
11-19-2009, 03:36 AM
Hello java_freak,
This would be the very simplest example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
html, body {
font: 100.1% "Comic Sans MS";
background: #FC6;
}
* {
margin: 0;
padding: 0;
border: 0;
outline: 0;
}
#container {
height: 600px;
margin: 0 20%;
background: #999;
font-size: 0.8em;
}
</style>
</head>
<body>
<div id="container">
<!--end container--></div>
</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum