sho: Box in Box positionieren

Beitrag lesen

Die Box mytest soll in der Box header positioniert werden.

Dafür das äußere DIV als position:relative definieren, dann richtet sich das innere nach ihm aus. Das innere bekommt position:absolute - damit kannst Du ihm bottom:0px (0px Abstand vom unteren Rand des äußeren DIV) und left:50% (die Mitte des äußeren DIVs) geben.

  
<html>  
<head>  
<style type="text/css">  
<!--  
div.header{  
	position:relative;  
	width:1080px;  
	height:378px;  
	background:#c3c3c3;  
}  
div.mytest {  
	position:absolute;  
	bottom:0px;  
	width:100px;  
	left:50%;  
	background:#000000;  
	color:#FFFFFF;  
}  
-->  
</style>  
</head>  
<body>  
<div class="header">  
    <div class="mytest">  
   	 <p>Text  Text  Text  Text  Text  Text  Text  Text  
   	  Text  Text  Text  Text  Text  Text  Text  Text  
   	   Text  Text  Text  Text  Text  Text  Text  Text  
   	  </p>  
    </div>  
</div>  
</body>  
</html>  

es grüßt:s.