Nick Gilbert
Nick Gilbert

Reputation: 4240

Bootstrap's Outline Buttons Behave like Regular Buttons

I'm trying to use Bootstrap's btn-outline-primary class to make a nice looking button like this

enter image description here

However, when I try and do that in my HTML code

<!DOCTYPE html>
<html lang="en">
    <head>
        <title></title>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
    </head>
    <body>
        <button type="button" class="btn btn-outline-primary">Primary</button>
        <button type="button" class="btn btn-outline-primary">Primary</button>
    </body>
</html>

The buttons come out solid

enter image description here

and I don't know why. Any help would be greatly appreciated.

Upvotes: 1

Views: 1398

Answers (2)

Pragyakar
Pragyakar

Reputation: 642

Are you using the right bootstrap version? btn-outline-primary is available only in Bootstrap v4. If you are using older versions, it will not work.

Upvotes: 2

Cory J.
Cory J.

Reputation: 392

btn-outline-primary is only available in Bootstrap v4 and you have 3.3.7 loaded. Try giving v4 a whirl to see if it works.

See this bootply and switch between 3.3.7 and alpha v4 to demo.

Upvotes: 4

Related Questions