Hallo Sabri,
das geht eigentlich recht simpel. Zur Veranschaulichung einer kurzer Testcase:
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" lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Testcase</title>
</head>
<body>
<div style="min-width:960px; max-width:1040px; height:100px; background-color:#f00">
<div style="width:960px; height:100px; background-color:#ccc; float:right;">container</div>
</div>
</body>
</html>
Ich sollte allerdings dazu sagen, dass die Eigenschaften min-width und max-width nicht vom IE6 unterstützt werden.
Lesezeichen