herrmann: Bild positionieren - an .container orientieren

Beitrag lesen

Hallo an alle selfHTMLer :)

.container {

width: 960px;
height: 600px;
margin: 30px 10% 30px 10%;
background: #C6F;

  
Die Angaben zu Breite <960px> und Außenabstand <10%> \*beißen\* sich. Bei mir klappt es in IE, FF und Opera mit folgendem (habe aber gerade nur ein 540px breites Bild zur Hand):  
  
~~~html
  
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"  
  "http://www.w3.org/TR/html4/strict.dtd">  
  
<html>  
<head>  
<style type="text/css">  
.container {  
        width:540px;  
        height:600px;  
        margin:30px auto;  
        background:#C6F;  
</style>  
</head>  
  
<body>  
<div class="container">  
<img alt="logo (19K)" src="http://lotharmelching.de/homepage_chor/bilder/chorfotos/logo.jpg" height="360" width="540">  
</div>  
</body>  
</html>  
  

Gruß H.