r5425 tlsa - in /trunk/netsurftest/works: absolute-position-first-child-of-containing-block.html float-clear-first3.html

netsurf at semichrome.net netsurf at semichrome.net
Tue Sep 23 20:44:34 BST 2008


Author: tlsa
Date: Tue Sep 23 14:44:34 2008
New Revision: 5425

URL: http://source.netsurf-browser.org?rev=5425&view=rev
Log:
Add test case for absolute positioned element being first child of a containing block and another float test case.

Added:
    trunk/netsurftest/works/absolute-position-first-child-of-containing-block.html
    trunk/netsurftest/works/float-clear-first3.html

Added: trunk/netsurftest/works/absolute-position-first-child-of-containing-block.html
URL: http://source.netsurf-browser.org/trunk/netsurftest/works/absolute-position-first-child-of-containing-block.html?rev=5425&view=auto
==============================================================================
--- trunk/netsurftest/works/absolute-position-first-child-of-containing-block.html (added)
+++ trunk/netsurftest/works/absolute-position-first-child-of-containing-block.html Tue Sep 23 14:44:34 2008
@@ -1,0 +1,34 @@
+
+<html>
+<head>
+<title>Absolute position test</title>
+</head>
+<body>
+  
+<div style="float:left; width:450px; padding-top:5em;">
+	<div style="position:absolute; top:0; right:0; color:red;">
+		Absolute positioned
+	</div>
+
+	<p>
+		When an absolute positioned element is the first child of a
+		float with a top padding, the following children which are
+		in &quot;normal flow&quot; are not positioned with respect
+		to the top padding, but float children are. Other padding
+		(e.g. left) is no problem.
+	</p>
+
+	<div style="float:left;width:120px;height:60px;border:2px dotted red;">
+		Float
+	</div>
+
+	<p>
+		When an absolute positioned element is the first child of a
+		float with a top padding, the following children which are
+		in &quot;normal flow&quot; are not positioned with respect
+		to the top padding, but float children are. Other padding
+		(e.g. left) is no problem.
+	</p>
+
+</body>
+</html>

Added: trunk/netsurftest/works/float-clear-first3.html
URL: http://source.netsurf-browser.org/trunk/netsurftest/works/float-clear-first3.html?rev=5425&view=auto
==============================================================================
--- trunk/netsurftest/works/float-clear-first3.html (added)
+++ trunk/netsurftest/works/float-clear-first3.html Tue Sep 23 14:44:34 2008
@@ -1,0 +1,19 @@
+<html>
+<head>
+<style>
+div {width:4em; height:4em;}
+</style>
+</head>
+
+<body>
+
+
+<div style="background:red; float:left; clear:left;"></div>moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose moose
+
+<div style="width:100%;">
+<div style="background:red;   float:left; clear:left;"></div>
+<div style="background:green; float:left;"></div>
+<div style="background:blue;  float:left;"></div>
+</div>
+
+<p style="clear:both;">Should be three equal sized boxes above. Left to right: red, green, blue.</p>




More information about the netsurf-commits mailing list