"Bootstrap Conditional Button Group like Semantic UI"
Bootstrap 4.0.0 Snippet by kullar84

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!-- from semantic ui inspired btn group with or--> <div class="mtop20"> <div class="container"> <div class="row"> <div class="col text-center"> <div class="btn-group btn-group-or" role="group"> <button class="btn btn-secondary">Cancel</button> <div class="or"></div> <button class="btn btn-primary">Save</button> </div> </div> </div> </div> </div>
.mtop20{ margin-top:20px; } .btn-group-or>.btn:first-child { padding-right: 1.2rem; } .btn-group-or>.btn:last-child { padding-left: 1.2rem; } .btn-group-or .or { position: relative; width: .3rem; height: 2.5rem; z-index: 3; } .btn-group-or .or:before { position: absolute; text-align: center; border-radius: 50%; content: 'or'; top: 50%; left: 50%; background-color: #fff; margin-top: -1rem; margin-left: -1rem; width: 2rem; height: 2rem; line-height:1.8rem; color: #868e96; }

Related: See More


Questions / Comments: