Help with Bootstrap Buttons for Portfolio

Help with Bootstrap Buttons for Portfolio
0.0 0

#1
<div class= "btn-group btn-group-lg text-center">
  <button type="button" class="btn btn-primary">About</button>
  <button type= "button" class= "btn btn-primary">Portfolio</button>
  <button type="button" class= "btn btn-primary">Contact</button>
              </div>

Here is my code for my buttons… what am i doing wrong?? I’m going nuts


#2

I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.


#3

What are you expecting, and what is happening?


#4

I’m wanting to center the buttons and also put them into a button group (didn;t learn about that on FCC but I like the look of it)

Thanks!


#5

Could you post a link to your code?


#6

If you are using bootstrap 4.1 you can wrap the buttons in a divide and add the d-flex class followed by the justify-content-center class.

<div class="d-flex justify-content-center">
    <div class= "btn-group btn-group-lg text-center">
        <button type="button" class="btn btn-primary">About</button>
        <button type= "button" class= "btn btn-primary">Portfolio</button>
        <button type="button" class= "btn btn-primary">Contact</button>
    </div>
</div>