Thread: CSS/HTML Help
View Single Post
  #4 (permalink)  
Old 29-October-2007, 10:55 PM
tofu tofu is offline
Senior Member
 
Join Date: Nov 2003
Location: florida, USA
Posts: 2,407
Default

This sort-of works:

Code:
<!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" lang="en">

<head>
	<title>title</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<style type="text/css">
		body {
			background-color:#fcc;
		}
		div#center {
			background-color:#fff;
			width: 300px;
			height: 300px;
			margin: auto;
			position: absolute;
			top: 40%;
			right: 40%;
			bottom: 40%;
			left: 40%;
		} 
	</style>
</head>

<body>

	<div id="center">
		<p>The cake is a lie!</p>
	</div>

</body>
</html>
Reply With Quote