Skip to content

Instantly share code, notes, and snippets.

@oliverastro
Last active September 9, 2023 18:50
Show Gist options
  • Save oliverastro/1564d074d2ac42dc50c2f5a614833e6e to your computer and use it in GitHub Desktop.
Save oliverastro/1564d074d2ac42dc50c2f5a614833e6e to your computer and use it in GitHub Desktop.
Vertical divider between columns (CSS only)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.row.vdivide [class*='col-']:not(:last-child):after {
background: #e0e0e0;
width: 1px;
content: "";
display:block;
position: absolute;
top:0;
bottom: 0;
right: 0;
min-height: 70px;
}
</style>
</head>
<body>
<div class="container">
<div class="row vdivide">
<div class="col-sm-4 text-center"><h1>One</h1></div>
<div class="col-sm-4 text-center"><h1>Two</h1></div>
<div class="col-sm-4 text-center"><h1>Three</h1></div>
</div>
</div>
<hr>
<div class="container">
<div class="row vdivide">
<div class="col-sm-6 text-center"><h1>One</h1></div>
<div class="col-sm-6 text-center"><h1>Two</h1></div>
</div>
</div>
<hr>
<div class="container">
<div class="row vdivide">
<div class="col-sm-3 text-center"><h1>One</h1></div>
<div class="col-sm-3 text-center"><h1>Two</h1></div>
<div class="col-sm-3 text-center"><h1>Three</h1></div>
<div class="col-sm-3 text-center"><h1>Four</h1></div>
</div>
</div>
<hr>
</body>
</html>
@teklifbilisim
Copy link

xvccxzbvc

@teklifbilisim
Copy link

cxvbcxvb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment