When I create a div it always add space to top and left side. Here is an image: http://img265.imageshack.us/img265/7346/83425851cc8d4fc49eb78a9.png
I don’t want that space, so what can I do to solve it?
HTML 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">
<head>
<title>Wozzies Blog</title><meta charset="utf-8"></meta>
<link rel="stylesheet" type="text/css" href="css/layout.css" />
</head>
<body>
<div id="container">
</div>
</body>
</html>
CSS CODE:
body{
background-image:url('../img/bg.png');
background-repeat:repeat-y;
}
#container{
background-image:url('../img/bgcontentor.png');
background-repeat:repeat-y;
width: 798px;
height: 685px;
margin: auto;
}
Try to give 0 to this properties:
With this code, space should disappear since, padding and margins are 0.