Nibras Shami
Nibras Shami

Reputation: 292

make spaces between two Buttons in html (no css)

i made two buttons and margin them to the right to appear on the right side of the page, but the buttons is stick together with no space between them, and i tried to margin 30px e.g. but they both margin together

<button type="button" class="btn btn-primary" style="float: right; margin-right: 30px;">Login</button>
<button type="button" class="btn btn-secondary" style="float: right; margin-left: 30px;">Register</button>

this is a picture of the two buttons i made

enter image description here

Upvotes: 0

Views: 2721

Answers (1)

Yasin BARAN
Yasin BARAN

Reputation: 257

I guess you are using bootstrap. You can use these classes in bootstrap:

<button type="button" class="btn btn-primary float-right">Login</button>
<button type="button" class="btn btn-secondary float-right mr-3">Register</button>

result

  • use float-right class instead of inline style.
  • use mr-x class to give margin (x => 1,2,3,4,5)

Upvotes: 1

Related Questions