Align child div to bottom of parent div


/ Published in: CSS
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <head>
  4. <title></title>
  5. </head>
  6. <style>
  7. html, body {height: 100%}
  8. #outer {position: relative; height: 50%;}
  9. #inner {position: absolute; bottom: 10px;}
  10. #outer, #inner {border: 1px solid #ccc;}
  11. </style>
  12. <body>
  13. <div id="outer">OUTER
  14. <div id="inner">INNER
  15. </div>
  16. </div>
  17. </body>
  18. </html>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.