View Full Version : How do i Center website both horizontally and vertically in dreamweaver?
rema
Jul 27, 2007, 04:15 PM
Really struggling to do this I want the site to sit in the middle of the screen, I’ve managed to center it vertically but the space above and bellow is odd,
Any help would really be great,
Cheers rema
any one?
Mitthrawnuruodo
Jul 27, 2007, 08:08 PM
There was a thread about this just the other day, but since I'm too lazy to search for it, I'm just going to post one way of doing it... ;)
Mind you this uses tables for layout, which is frowned upon, but it works and validates, which is most important to me:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<style type="text/css">
html, body { height: 100%; padding: 0; margin: 0; }
table { text-align: center; height: 100%; width: 100%; border: 0; }
</style>
</head>
<body>
<table>
<tr>
<td>
<!-- Place contents here for absolute centering -->
</td>
</tr>
</table>
</body>
</html>
DigitalAx
Jul 27, 2007, 08:51 PM
Here (http://forums.macrumors.com/showthread.php?t=333415) is the thread.
Or to sum it up: Go here (http://www.waxpad.com/articles/vcexample.html) and steal the code. Explained more here (http://www.waxpad.com/articles/waverticalcentering.html).
;)
rema
Jul 28, 2007, 05:38 AM
thanks you two i will give it ago and tell you guys hows it goes,
thanks again rema
vBulletin® v3.6.10, Copyright ©2000-2009, Jelsoft Enterprises Ltd.