...

View Full Version : Help with layout



java_freak
11-20-2009, 07:24 PM
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..

met
11-20-2009, 08:00 PM
you can center a document using css



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>Centered Page</title>

<style type="text/css">
#wrapper {
width:974px;
margin:auto;
height:500px; /* for display purposes */
background:red;
}
</style>
</head>
<body>
<div id="wrapper">
<h1>This DIV is centered..</h1>
<div>
</body>

</html>

Excavator
11-20-2009, 08:32 PM
How many times do you plan on asking this question?

http://www.codingforums.com/showthread.php?t=182486
http://www.codingforums.com/showthread.php?t=182485
http://www.codingforums.com/showthread.php?t=182483
http://www.codingforums.com/showthread.php?t=182480

If the previous 4 threads have not answered it to your satisfaction, maybe you should post some code of an actual attempt on your part to write something. That way, you could explain in more detail what you're trying to do.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum