/* here is our table */
.table {
display: table;
border-collapse: collapse;
margin-left: auto;
margin-right: auto;
width: 95%;
overflow: auto;
text-align: left;
border-top: 1px solid #CCC;
border-right: 1px solid #CCC;
}
.table ul {
display: table-row;
list-style: none;
height: 2em;
width: 100%;
}
.table ul li {
display: table-cell;
height: 2em;
border-left: 1px solid #CCC;
border-bottom: 1px solid #CCC;
padding: 0.5em 0.5em;
width:10%;
}
.table ul.header {
height: 2.5em;
background: #EEE;
}
.table ul.header li {
height: 2.5em;
text-align: left;
font-weight: bold;
font-size: 1em;
padding-top: 0.7em;
padding-bottom: 0;
}
A typical example of using the stylesheet above would look as follows:
- Product Name
- Product Code
- Unit Price
- Quantity
- MacBook Pro
- ML-1025a
- USD 1500
- 2
- Google Nexus One
- GNO-v1.0
- USD 499
- 10
Well that's it. Hope someone finds it useful.
No comments:
Post a Comment