Tutorialspoint examples

Learn java tutorial with examples for beginners online

Bootstrap 4 Justified Button Groups Tutorial


The .btn-group-justified class is used to span the entire width of the screen.

Bootstrap 4 Justified Button Groups Example:

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap 4 Justified Button Groups Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
</head>
<body>
 
<div class="container">
  <h2>Bootstrap 4 Justified Button Groups Example</h2>
  <div class="btn-group btn-group-justified">
    <div class="btn-group">
      <button type="button" class="btn btn-primary">Apple</button>
    </div>
    <div class="btn-group">
      <button type="button" class="btn btn-primary">Samsung</button>
    </div>
    <div class="btn-group">
      <button type="button" class="btn btn-primary">Sony</button>
    </div>
  </div>
</div>
 
</body>
</html>

Try it:

Bootstrap 4 Justified Button Groups Example on jsbin.com

Copyright © 2018 Tutorialspoint examples DMCA.com Protection Status