-3

The code I have now is the following:

<div id="bint">
  <button id="ButtonA">
    Option A
  </button> 
  <button id="ButtonB">
    Option B
  </button>
</div>

This code won't align the buttons unless I remove the div tag. What is the easiest way to put them in line?

Calvin Nunes
  • 6,376
  • 4
  • 20
  • 48
Stan Homer
  • 15
  • 3

2 Answers2

1

By default the buttons are align in inline-block, so they will appear horizontally. If you want to present them vertically you sould set a css rule to diplay: block. You can see more information in the follow link: Which display mode do HTML buttons have?

0

I would check out CSS Flexbox, take a look at this Flexbox generator to help you understand it better.

RiddleMeThis
  • 1,345
  • 4
  • 16
  • 29