grid-abspos-staticpos-align-self-img-last-baseline-001-ref.html (1608B)
1 <!DOCTYPE html> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/publicdomain/zero/1.0/ 5 --> 6 <html> 7 <head> 8 <meta charset="utf-8"> 9 <title>CSS Reference</title> 10 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> 11 <style> 12 .container { 13 display: block; 14 padding: 1px 2px; 15 border: 1px solid black; 16 background: yellow; 17 margin-bottom: 5px; 18 margin-right: 5px; 19 float: left; /* For testing in "rows" of containers */ 20 } 21 br { clear: both } 22 23 .big > .container { 24 height: 40px; 25 width: 22px; 26 } 27 .small > .container { 28 height: 2px; 29 width: 4px; 30 margin-bottom: 20px; /* to reduce overlap between overflowing images */ 31 } 32 33 .container > * { 34 margin-left: 3px; 35 display: block; 36 } 37 .big .alignStart { margin-top: 2px; } 38 .big .alignCenter { margin-top: 9px; } 39 .big .alignEnd { margin-top: 16px; } 40 .small .alignStart { margin-top: 0px; } 41 .small .alignCenter { margin-top: -7px; } 42 .small .alignEnd { margin-top: -14px; } 43 </style> 44 </head> 45 <body> 46 <!-- The last baseline value, from 47 https://www.w3.org/TR/css-align-3/#propdef-align-self --> 48 <div class="big"> 49 <div class="container"><img src="support/colors-8x16.png" 50 class="alignEnd"><!--last baseline--></div> 51 </div> 52 <div class="small"> 53 <div class="container"><img src="support/colors-8x16.png" 54 class="alignEnd"><!--last baseline--></div> 55 </div> 56 </body> 57 </html>