Files
servo/tests/wpt/css-tests/css21_dev/html4/first-line-floats-004.htm

28 lines
1.0 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<title>CSS Test: :first-line</title>
<link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu">
<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/">
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-line-pseudo">
<link rel="match" href="reference/first-line-floats-001-ref.htm">
<meta name="flags" content="dom">
<style type="text/css">
div { color: green }
div:first-line { color: red }
</style>
<script type="text/javascript">
function runTest() {
var s = document.createElement("span");
s.setAttribute("style", "float: left");
s.appendChild(document.createTextNode("This should be green"));
var i = document.getElementById("i");
i.parentNode.insertBefore(s, i);
}
</script>
</head>
<body onload="runTest()">
<div><span id="i"></span></div>
</body></html>