How align the input textbox center of the page?

Posted by Sangeetha Mani under CSS 3 on 7/9/2014 | Points: 10 | Views : 645 | Status : [Member] | Replies : 2
Hi all,

My scenario is
<div>
<p class="a"><input id="a1" type="text" name="aa"/>
</p>
<input id="b1" type="text" name="bb">
</div>

It should align that two input textbox together in center of the page

that code should work for both portarait and landscape ?

Please post your answer as soon as possible...

Thanks for advance.

sangeetha.m


Responses

Posted by: Bandi on: 7/10/2014 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Refer this link
http://www.brunildo.org/test/img_center.html

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Sangeetha Mani, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Goud.Kv on: 7/10/2014 [Member] [MVP] Gold | Points: 25

Up
0
Down
Hello Mani,

Please replace your code with below

<div style="text-align:center;">
<p class="a">
<input id="a1" type="text" name="aa"/>
</p>
<input id="b1" type="text" name="bb">
</div>


It works fine,

Thanks & Regards,
Krishna

Sangeetha Mani, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response