cpw: Problem bei DIV

Beitrag lesen

Ganz vergessen:

Der Internet Explorer (zumindest Version 6) unterstützt min-width nicht. Dem kann man das per Conditional Comment unterjubeln - der IE streckt die Breite eines divs nebst Hintergrund automatisch:

  
  
<!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>  
 Test  
 </title>  
  
<style type="text/css">  
#meindiv  
{  
 position:absolute;  
 top:10px;  
 left:10px;  
 min-width:50px;  
 background-color:green;  
}  
  
</style>  
  
<!--[if IE 6]>  
<style type="text/css">  
#meindiv  
{  
 width:50px;  
}  
</style>  
<![endif]-->  
</style>  
  
</head>  
<body>  
  
  
<div id="meindiv">  
blablablablablablablablablablablabla  
</div>  
  
</body>  
</html>