layout: Draw elements with position: relative; z-index: auto over

ordinary content per CSS 2.1 Appendix E.

Improves Talking Points Memo.
This commit is contained in:
Patrick Walton 2015-05-11 16:29:24 -07:00
parent 234fb68a16
commit 87a620e1b3
7 changed files with 117 additions and 17 deletions

View file

@ -252,6 +252,7 @@ experimental != overconstrained_block.html overconstrained_block_ref.html
== position_fixed_tile_edge_2.html position_fixed_tile_edge_ref.html
== position_fixed_tile_edge_3.html position_fixed_tile_edge_ref.html
== position_relative_a.html position_relative_b.html
== position_relative_painting_order_a.html position_relative_painting_order_ref.html
== position_relative_top_percentage_a.html position_relative_top_percentage_b.html
== pre_ignorable_whitespace_a.html pre_ignorable_whitespace_ref.html
== pre_with_tab.html pre_with_tab_ref.html

View file

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<style>
html, body {
margin: 0;
}
div {
height: 100px;
width: 100px;
}
#a {
position: relative;
top: 50px;
left: 50px;
background: purple;
}
#b {
background: steelblue;
}
</style>
</head>
<body>
<div id=a></div>
<div id=b></div>
</body>
</html>

View file

@ -0,0 +1,30 @@
<!DOCTYPE html>
<html>
<head>
<style>
html, body {
margin: 0;
}
div {
position: absolute;
height: 100px;
width: 100px;
}
#a {
top: 50px;
left: 50px;
background: purple;
}
#b {
background: steelblue;
left: 0;
top: 100px;
}
</style>
</head>
<body>
<div id=b></div>
<div id=a></div>
</body>
</html>