Skip to content

Instantly share code, notes, and snippets.

@ariellindo
Created October 25, 2013 20:22
Show Gist options
  • Save ariellindo/7161250 to your computer and use it in GitHub Desktop.
Save ariellindo/7161250 to your computer and use it in GitHub Desktop.
adding border to table Rows in display: table-row
.divContainer{
display:table;
border-spacing:0 5px; //bottom spacing
width:100%;
}
.item{
display:table-row;
height:45px;
-moz-border-radius:10px;
-webkit-border-radius:10px;
border-radius:10px;
}
.itemHeader, .itemBody, .itemFlag{
display:table-cell;
}
.itemHeader{
width:100px;
}
.itemBody{
width:150px;
}
.itemFlag{
width:20px;
}
.item > div {
background-color: #ccc;
height: 50px
}
.item > div:first-child {
border-radius: 10px 0 0 10px;
-moz-border-radius: 10px 0 0 10px;
}
.item > div:last-child {
background-color: #333;
border-radius: 0 10px 10px 0;
-moz-border-radius: 0 10px 10px 0;
}
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<div class="divContainer">
<div class="item">
<div class="itemHeader">sdf</div>
<div class="itemBody">sdf</div>
<div class="itemFlag">sdf</div>
</div>
<div class="item">
<div class="itemHeader">sdf</div>
<div class="itemBody">sdf</div>
<div class="itemFlag">sdf</div>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment