Bootstrap > Forms

Horizontal form in Bootstrap

How to create horizontal form in bootstrap

To create horizontal form in Bootstrap, we can use form-inline class.

HTML Form code

<form action="/ReOrder" class="form-inline" method="post">
	<div class="form-group">
        	<select class="form-control" id="CategoryId" name="CategoryId">
		<option value="1">ASP.NET Web 		Forms</option>
		<option value="2">ASP.NET MVC</option>
		<option value="4">SQL Server</option>
	<div class="form-group">
        	<input type="submit" value="Submit" class="btn btn-default" />

Notice the class attribute of the <form> element.


Horizontal bootsrtrap form

 Views: 4110 | Post Order: 12

Write for us

Hosting Recommendations