Knowledge Walls
John Peter
Pune, Maharashtra, India
Div table in HTML with CSS Example in Computer software engineer articles of One day One Thing to Know
2846 Views
HTML
<div class="boxer">
   <div class="box-row">
    <div class="box">A</div>
    <div class="box">B</div>
   </div>
   <div class="box-row">
    <div class="box" style="width: 100px;">C</div>
    <div class="box">D</div>
   </div>
   <div class="box-row">
    <div class="box">E</div>
    <div class="box">F</div>
   </div>
</div>
CSS
.boxer {
   display: table;
   background-color: yellow;
   border-collapse: collapse;
}

.boxer .box-row {
   display: table-row;
}

.boxer .box {
   width: 50px;
   height: 50px;
   display: table-cell;
   text-align: center;
   vertical-align: middle;
   border: 1px solid black;
}
OUTPUT 
DEMO 
Best Lessons of "One day One Thing to Know"
Top lessons which are viewed more times.
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details