position-area-pseudo-element-implicit-anchor-ref.html (485B)
1 <!DOCTYPE html> 2 <title>CSS Test Reference</title> 3 <style> 4 body { margin: 0 } 5 #target { 6 margin-top: 100px; 7 margin-left: 50px; 8 width: 100px; 9 height: 100px; 10 background: blue; 11 position: relative; 12 } 13 #target > div { 14 position: absolute; 15 width: 100px; 16 height: 100px; 17 background: green; 18 } 19 #bottom { 20 top: 100px; 21 left: 0px; 22 } 23 #right { 24 top: 0px; 25 left: 100px; 26 } 27 </style> 28 <div id=target> 29 <div id=bottom></div> 30 <div id=right></div> 31 </div>