Ein Stein: Text Einzug

Beitrag lesen

Hallo!

Ich habe leider ein kleines Probem. Ich habe ein Layout per css positioniert, nun habe ich über dem div des Bodys ein div mit dem inhalt gemacht. Ich habe im div inhalt ein margin right und margin left von 20px definiert, um einen Texteinzug zum body zu bekommen. Dieser funktioniert allerdings nicht, oder anderst gesagt, er funktioniert nur auf der linken Seite.

Hier der Code:

  
  
@charset "utf-8";  
  
#container{  
	width:999px;  
	height:599px;  
	margin-top:auto;  
	margin-left:auto;  
	margin-right:auto;  
	margin-bottom:auto;  
	border: 1px solid black;  
	position: relative;  
	background-color: grey;  
}  
  
#nav{  
	width: 999px;  
	height: 54px;  
	position: absolute;  
	background-image: url('img/nav.png');  
}  
  
#head{  
	width: 999px;  
	height: 150px;  
	margin-top: 54px;  
	position: absolute;  
	background-image: url('img/head.png');  
}  
  
#menue{  
	width: 200px;  
	height: 395px;  
	margin-top: 204px;  
	position: absolute;  
	background-image: url('img/menue.png');  
}  
  
#body{  
	width: 799px;  
	height: 395px;  
	margin-top: 204px;  
	margin-left: 200px;  
	position: absolute;  
	background-image: url('img/body.png');  
}  
  
#inhalt{  
	margin-left: 20px;  
	margin-right: 20px;  
	position: absolute;  
}  
  

Und HTML:

  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">  
<head>  
<title>Home</title>  
<link rel= "stylesheet" type="text/css" href="style.css"/>  
</head>  
<body>  
	<div id="container">  
		<div id="nav"></div>  
		<div id="head"></div>  
		<div id="menue"></div>  
		<div id="body">  
			<div id="inhalt">  
			<p>  
			</p>  
			</div>  
		</div>  
	</div>  
</body>  
</html>  

Eigentlich sollte ja nun der Inhalt auf dem Body element 20px Einzug haben. Hat er aber leider nicht.

Bin euch für eure Hilfe sehr dankbar!