DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Need To Center The Content Div

06.18.2008
| 5549 views |
  • submit to reddit
        // description of your code here

<!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" xml:lang="en">
	<style type="text/css">
	body {
		margin-left: 0px;
		margin-top: 0px;
		margin-right: 0px;
		margin-bottom: 0px;
		background-color:#8E908F;
		<!--background-image:url(images/repeatingBackground.jpg);
		background-repeat:repeat-x;-->
		text-align: center;
	}
	div#content {
		position: relative;
		margin:0 auto;
		display:block;
		width:1024px;
		background-color:#8E908F;
		text-align:center;
	}
	</style>
	<head>
		<title>Classroom</title>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<script type="text/javascript" src="js/swfobject.js"></script>
		<script type="text/javascript">
		swfobject.embedSWF("media/Main.swf", "content", "1024", "576", "9.0.0", "media/expressInstall.swf", {},{allowfullscreen: "true", base: "media"}, {});
		</script>
	</head>
	<body>
		<div id="content">
			<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
		</div>
	</body>
</html>