Posted By

webdevelopertut on 08/03/09


Tagged

css align bottom horizontall


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

vali29
WinterCrow
Priestd09
fhenderson


Center align a div horizontally and bottom of the page


 / Published in: CSS
 

URL: http://htmlcsstutorials.blogspot.com/2009/08/center-align-div-horizontally-and.html

  1. HTML:
  2. <div class="parent">
  3. <div class="child">
  4. Content here
  5. </div>
  6. </div>
  7.  
  8. CSS:
  9. .parent{
  10. position:fixed;
  11. bottom:0px;
  12. width:100%; //width should be 100%
  13. }
  14. .child{
  15. width:100px; //min width should give to center the div.
  16. margin:0px auto; //here it will make center
  17. }

Report this snippet  

You need to login to post a comment.