Saturday, October 22, 2011

How to align two from in the same line

Recently i come accross project which require to place a Show Tag form and a Search form in the same line.

Normally when you put two form together, it will align one on top of the other. In order to make it align into the same line , we need to do something on the css style.

step 1 create paste the following code into you css file or the style section of you html file

.formleft {
float:left;
}
.formright {
float:right;
}

step 2 place the formleft and formright class into you form tag as following

<form action="#" method="post" class="formleft">
<input type="text" name="searchstr">
<input type="submit" value="Search" name="searchbtn">
</form>

<form action="#" method="post" class="formright">
<input type="text" name="facetype">
<input type="submit" value="Show Tags" name="submittag">
</form>

Blue Ocean Accounting Software - Free for commercial and personal use

No comments: