Reputation: 12517
this is my code: http://jsfiddle.net/spadez/Nz9pY/14/
I'm trying to get the dividing lines between each column like I should have if it were a real table rather than a div with the table properties?
My research told me to add these lines but it doesnt do anything:
.table { display: table; border-collapse: collapse;}
.tablerow { display: table-row; border: 1px solid #000;}
.tablecell { display: table-cell; }
Upvotes: 0
Views: 51
Reputation: 6668
Add a border
to your css
#wrapper div {
display: table-cell;
text-align: center;
border-right: 1px solid black;
}
Update:
To remove the border on the last div, use the following instead:
#wrapper div:not(:last-child){
border-right: 1px solid black;
}
Upvotes: 1
Reputation: 4086
You mean this?
#wrapper div {
border: 1px solid #000;
}
#wrapper div:not(:first-child) {
border-left: none;
}
Upvotes: 1
Reputation: 1041
Give border-left
to yout div
elements inside your #wrapper
element and also border-right
to the last
div
.
#wrapper div {
display: table-cell;
text-align: center;
border-left:1px solid
}
#wrapper div:last-child{
display: table-cell;
text-align: center;
border-right:1px solid
}
EDIT
If you want all the borders to be visible
#wrapper div {
display: table-cell;
text-align: center;
border-left:1px solid;
border-top:1px solid;
border-bottom:1px solid
}
#wrapper div:last-child{
display: table-cell;
text-align: center;
border-right:1px solid
}
Upvotes: 1
Reputation: 71230
Adding that CSS wont work because you have no elements using those classes, you could simply add:
border: 1px solid #000;
to your CSS for
#wrapper div
For no double internal; borders, use the below CSS:
#wrapper {
display: table;
table-layout: fixed;
width:100%;
}
#wrapper div {
display: table-cell;
text-align: center;
border: 1px solid #000;
border-right: none;
}
#wrapper div:last-child {
border-right: 1px solid #000;
}
#wrapper div:hover {
background-color:red;
}
.lrg {
display: block;
font-size: 30px;
}
Upvotes: 2