Created
November 7, 2014 21:01
-
-
Save seyDoggy/5e25412e241f78495824 to your computer and use it in GitHub Desktop.
A table-esq Bootstrap panel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* See it in action here: http://jsfiddle.net/seydoggy/6s92p51a/ | |
*/ | |
.panel-table { | |
display:table; | |
} | |
.panel-table > .panel-heading { | |
display: table-header-group; | |
background: transparent; | |
} | |
.panel-table > .panel-body { | |
display: table-row-group; | |
} | |
.panel-table > .panel-body:before, | |
.panel-table > .panel-body:after { | |
content:none; | |
} | |
.panel-table > .panel-footer { | |
display: table-footer-group; | |
background: transparent; | |
} | |
.panel-table > div > .tr { | |
display: table-row; | |
} | |
.panel-table > div:last-child > .tr:last-child > .td { | |
border-bottom: none; | |
} | |
.panel-table .td { | |
display: table-cell; | |
padding: 15px; | |
border: 1px solid #ddd; | |
border-top: none; | |
border-left: none; | |
} | |
.panel-table .td:last-child { | |
border-right: none; | |
} | |
.panel-table > .panel-heading > .tr > .td, | |
.panel-table > .panel-footer > .tr > .td { | |
background-color: #f5f5f5; | |
} | |
.panel-table > .panel-heading > .tr > .td:first-child { | |
border-radius: 4px 0 0 0; | |
} | |
.panel-table > .panel-heading > .tr > .td:last-child { | |
border-radius: 0 4px 0 0; | |
} | |
.panel-table > .panel-footer > .tr > .td:first-child { | |
border-radius: 0 0 0 4px; | |
} | |
.panel-table > .panel-footer > .tr > .td:last-child { | |
border-radius: 0 0 4px 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="panel panel-default panel-table"> | |
<div class="panel-heading"> | |
<div class="tr"> | |
<div class="td">heading</div> | |
<div class="td">heading</div> | |
<div class="td">heading</div> | |
</div> | |
</div> | |
<div class="panel-body"> | |
<div class="tr"> | |
<div class="td">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Similique facere necessitatibus quo laboriosam consequuntur</div> | |
<div class="td">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Excepturi aliquam placeat odit quasi autem distinctio veritatis ex numquam nihil</div> | |
<div class="td">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Excepturi aliquam placeat odit quasi autem distinctio veritatis ex numquam nihil nulla tempora a dolorem omnis beatae facilis perspiciatis doloribus? Error dolore!</div> | |
</div> | |
</div> | |
<div class="panel-footer"> | |
<div class="tr"> | |
<div class="td">footer</div> | |
<div class="td">footer</div> | |
<div class="td">footer</div> | |
</div> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment