Skip to content

Instantly share code, notes, and snippets.

@ChristianGrech
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChristianGrech/8b7f9a188e6a52a71436 to your computer and use it in GitHub Desktop.
Save ChristianGrech/8b7f9a188e6a52a71436 to your computer and use it in GitHub Desktop.
.table {
display: table;
width: 100%;
}
.table-head {
display: table-header-group;
background-color: #FAFAFA;
font-size: 15px;
}
.table-body {
display: table-row-group;
}
.table-row {
clear:both;
display: table-row;
width: 100%;
}
.table-row > div {
display: table-cell;
padding: 10px 15px;
vertical-align: middle;
}
.table-row > div * {
line-height: 20px;
}
<div class="table">
<div class="table-head">
<div class="table-row">
<div>Name</div>
<div>Type</div>
<div>Size</div>
<div>Created On</div>
</div>
</div>
<div class="table-body">
<div class="table-row">
<div>Image1</div>
<div>PNG</div>
<div>216 KB</div>
<div>01 November 2014</div>
</div>
<div class="table-row">
<div>Image2</div>
<div>PNG</div>
<div>846 KB</div>
<div>03 November 2014</div>
</div>
<div class="table-row">
<div>Image3</div>
<div>PNG</div>
<div>531 KB</div>
<div>03 November 2014</div>
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment