CSS / HTML

Permabanned
Joined
19 Apr 2006
Posts
2,333
Location
West Yorkshire
Ok now for a css/html related question;

I have this in a php file:

Code:
<?php

echo '

<html>
<head>
<title>Darrens Test</title>

<link href="test.css" type="text/css" rel="stylesheet" />

</head>

<body>


<div id="container" align="center">
';

include("header.php");
include("leftnav.php");
include("body.php");
include("footer.php");

echo ' </div>

</body>
</html>
';

?>

and this in my css file:

Code:
body {
	font : 11px Verdana;
	color : #FFFFFF;
	background-color : #2c2b2b;
}

div#container {
	background-color : #FF0000;
	align : center;
	width : 800px;
	height : 600px;
	margin : 0;
	padding : 0;

}

but the container div is not lining up in the center of the page, everything else is right, but it doesnt sit in the center.

Thanks again guys, you knowledge is a valuable resource to me :)
 
Thanks guys, that margin worked a treat.

Although can some explain the margin and padding thing to me?

I could have played with that code all night and never would have guessed at it being a margin I would have to change.
 
Back
Top Bottom