Tuesday, February 1, 2011

ASP TextBox/Label Box Will Not Get as small as you want it

I was trying to get a small label aligned on my form, but no matter what I did, the label was much larger than what I had specified in the HTML. I tried various things but still could not get it to appear the correct size in Visual Studio, though it did look the correct size when I ran the code. I finally realized that I had named the field a large number of characters and the name was displayed on the design screen, as large as necessary to display the ID of the label. I changed the size so that the name was 3 characters and the label appeared the correct size. So watch out for the length of the ID's you use especially when trying to size a small field.

No comments:

Post a Comment