ShapeYourPath
(current)
Run Code
Live Code Editor- Bootstrap 4 Block Level Button
Source Code
<!DOCTYPE html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <meta name="description" content=""> <!-- Bootstrap CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" /> <title>Bootstrap 4 Block Level Button</title> </head> <body> <div class="container mt-4"> <h1>Bootstrap 4 Block Level Button</h1> <p> In this example, you will learn about the block-level button. It spans the entire width of the parent element. To make it, use display and gap utility classes. </p> <button type="button" class="btn btn-block btn-primary">Primary</button> <button type="button" class="btn btn-block btn-secondary">Secondary</button> <button type="button" class="btn btn-block btn-success">Success</button> <button type="button" class="btn btn-block btn-danger">Danger</button> <button type="button" class="btn btn-block btn-warning">Warning</button> <button type="button" class="btn btn-block btn-info">Info</button> <button type="button" class="btn btn-block btn-dark">Dark</button> <button type="button" class="btn btn-block btn--light">Light</button> <h2>Bootstrap Outline Block Level Button</h2> <button type="button" class="btn btn-block btn-outline-primary">Primary</button> <button type="button" class="btn btn-block btn-outline-secondary">Secondary</button> <button type="button" class="btn btn-block btn-outline-success">Success</button> <button type="button" class="btn btn-block btn-outline-danger">Danger</button> <button type="button" class="btn btn-block btn-outline-warning">Warning</button> <button type="button" class="btn btn-block btn-outline-info">Info</button> <button type="button" class="btn btn-block btn-outline-dark">Dark</button> <button type="button" class="btn btn-block btn-outline-light">Light</button> </div> <!--/container--> <!-- jQuery first, then Popper.js, then Bootstrap JS --> <script src="https://code.jquery.com/jquery-3.2.1.slim.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> </body> </html>
Output :
Running