I am trying to nicely format contact screen in my aspx page using CSS. With the following code, I am unable to click into the txtEmailAddress. If I take out padding:100px from the txtSubject Span element, then I am able to click into txtEmailaddress and edit. please help…
<div>
<span>
Your Email Address :
</span>
<span style="padding:100px">
<asp:TextBox ID="txtEmailAddress" runat="server"></asp:TextBox>
</span>
<br />
<span>
Subject :
</span>
<span style="padding:100px">
<asp:TextBox ID="txtSubject" runat="server"></asp:TextBox>
</span>
<br />
</div>
i tried copying and pasting and experienced the same behaviour, i.e. with padding on the subject span i couldn’t click into txtEmailAddress. I am running IE8 on vista SP1 if that helps at all. I also noticed that the text boxes were not aligned.
Whilst it doesn’t answer your question, have you thought about using Label tag and styling these tags. The form will be more accessible this way. You can find out more about this approach on alistapart here: