This may be something of a dirty workaround to some people, but to
avoid having to associate css rules with my textboxes or other input
fields I simply would define a textbox like this:
<asp:textbox id="Textbox1" runat="server" columns="10" width="50px"> |
IE uses the
width attribute to render the input control, and
Firefox uses the
columns attribute, ignoring the
width
attribute completely. Of course, as mentioned in a previous post,
Firefox computes the width of an input field using the
columns
attribute by multiplying the number of columns with the width of the
font characters. So keep that in mind, but if you use a consistent font
size for your form controls throughout your application, it should be
no trouble to figure out the relation of
width in pixels to the
columns value.
Hope that helps you out.