<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
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.
What are you expecting, and what is happening?
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!
Could you post a link to your code?
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>