View Full Version : ASP Button Control Displays Larger at Runtime

02-28-2007, 02:37 PM
I have a button control with this code:

<asp:Button ID="Button1" runat="server" Style="Z-INDEX: 102; LEFT: 230px; POSITION: absolute;
TOP: 165px;" Text="Button" />

In the design window it displays correctly. At run time, the button control is strewn across the page when the ENTER key is pressed.

Does anyone know why this happens?


02-28-2007, 03:13 PM
is there a css file at runtime which defines another size for the button?

02-28-2007, 03:22 PM
No - just the button control placed on the web form.

02-28-2007, 03:57 PM
I heard about this, it is a bug with IE. You will need to set the width of your button.

<asp:Button ID="Button1" runat="server" Text="Create Account" Width="100px" />

03-02-2007, 07:59 PM
Thanks - I"ve been setting the width. Thanks for the clarification!