user2387900
user2387900

Reputation: 215

Buttons come in different line

I have two buttons in html5,. I want that both should be displayed on same line, but they are coming in different line. what should i do. I have placed my code below :

<input type="button" class="btn btn-danger" id="stop"  style="width:50%;"/>

<input type="button" class="btn btn-reset" id="reset"  style="width:50%"/>

Upvotes: 1

Views: 173

Answers (3)

GilbertOOl
GilbertOOl

Reputation: 1309

try this :

<input type="button" class="btn btn-danger" id="stop"  style="width:50%; display:inline-block;"/>

<input type="button" class="btn btn-reset" id="reset"  style="width:50%; display:inline-block;"/>

Upvotes: 0

Sudarshan Tanwar
Sudarshan Tanwar

Reputation: 3607

Use width:49% in both buttons.

Demo here

Upvotes: 1

swapnesh
swapnesh

Reputation: 26732

Add float:left; in your input button

Fiddle - http://jsfiddle.net/wWYgZ/2/

Upvotes: 4

Related Questions