Kais Kiste | Sie sind hier: Kiste > IT & Web > CSS center

CSS center

Centering technique using css

HTML:

  <div class="centerWrapper">
    <div class="centerBox">
      ...<!-- content here, anything, any size -->
    </div>
  </div>

CSS:

.centerWrapper{
  display:table;
  text-algin:center;
  margin:0 auto;
}
.centerBox{
  display:table-cell;
  vertical-align:middle;
  text-align:left;
  zoom:1;
}