Files
servo/tests/wpt/css-tests/css21_dev/html4/margin-collapse-031.htm

48 lines
1.1 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>CSS Test: margin collapsing - child has no clearance</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="http://www.w3.org/TR/CSS21/box.html#collapsing-margins">
<link rel="match" href="reference/margin-collapse-031-ref.htm">
<meta name="flags" content="">
<meta name="assert" content="The top margin of an in-flow block-level element is adjoining to its first in-flow block-level child's top margin if the element has no top border, no top padding, and the child has no clearance.">
<style type="text/css">
body
{
background-color: white;
margin: 8px;
}
div#parent-block-container
{
background-color: red;
margin: 0px;
width: 100%;
}
div#child-block
{
background-color: green;
color: white;
margin: 100px 0px;
}
</style>
</head>
<body>
<div id="parent-block-container">
<div id="child-block">
Test passes if there is <strong>no red</strong>.
</div>
</div>
</body>
</html>