Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Feb 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ASP Button Control Displays Larger at Runtime

    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?

    Thanks!

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts
    is there a css file at runtime which defines another size for the button?
    I am the luckiest man in the world

  • #3
    New Coder
    Join Date
    Feb 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No - just the button control placed on the web form.

  • #4
    Regular Coder Freon22's Avatar
    Join Date
    May 2005
    Location
    USA
    Posts
    287
    Thanks
    3
    Thanked 5 Times in 5 Posts
    I heard about this, it is a bug with IE. You will need to set the width of your button.

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

  • #5
    New Coder
    Join Date
    Feb 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks - I"ve been setting the width. Thanks for the clarification!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •