block-in-inline-1.html (1205B)
1 <!DOCTYPE html> 2 <!-- Any copyright is dedicated to the Public Domain. 3 - http://creativecommons.org/publicdomain/zero/1.0/ --> 4 <html> 5 <head> 6 <title>CSS Test: Sticky Positioning - block inside inline, normal position</title> 7 <link rel="author" title="L. David Baron" href="mailto:dbaron@mozilla.com"> 8 <link rel="match" href="block-in-inline-1-ref.html"> 9 <meta name="assert" content="Inline elements split because they contain blocks should always have all parts moved the same offset from their normal position"> 10 <link rel="stylesheet" type="text/css" href="ahem.css"> 11 <style> 12 #scroll { 13 height: 100px; 14 overflow: hidden; 15 font: 20px/1 Ahem; 16 } 17 #contain { 18 height: 100px; 19 } 20 #sticky { 21 display: inline; 22 position: sticky; 23 top: 10px; 24 } 25 </style> 26 </head> 27 <body> 28 <div id="scroll"> 29 <div style="height: 20px"></div> 30 <div id="contain"> 31 before inline 32 <div id="sticky"> 33 before block 34 <div>in block</div> 35 after block 36 </div> 37 after inline 38 </div> 39 <div style="height: 100px"></div> 40 </div> 41 </body> 42 </html>