43 lines
1.2 KiB
HTML
43 lines
1.2 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html>
|
|
<head>
|
|
<title>CSS Test: Avoid nested floats in previous siblings</title>
|
|
<link rel="author" title="WebKit" href="http://www.webkit.org/">
|
|
<style type="text/css">
|
|
#container
|
|
{
|
|
width: 400px;
|
|
}
|
|
#div1
|
|
{
|
|
height: 80px;
|
|
width: 400px;
|
|
position: absolute;
|
|
}
|
|
#float-right
|
|
{
|
|
float: right;
|
|
height: 20px;
|
|
width: 400px;
|
|
background-color: green;
|
|
}
|
|
#div2
|
|
{
|
|
/*'overflow: hidden' forces the div to avoid floats*/
|
|
overflow: hidden;
|
|
font: 10px Ahem;
|
|
color: red;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<p>There should be no red below.</p>
|
|
<div id="container">
|
|
<div id="div1">
|
|
<div id="float-right"></div>
|
|
</div>
|
|
<div id="div2">You should not see this text</div>
|
|
</div>
|
|
</body>
|
|
</html>
|