Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting <input type="button"...> width in Netscape?

Status
Not open for further replies.

casa3311

Programmer
Dec 10, 2002
12
US
I have a form in which I would like to be able to control the size of my submit and reset buttons. I have 3 buttons which I would like to all be the same size. This is no problem in IE. I just set my height and width in my style sheet. However, Netscape does not seem to recognize the height/width. It adds a huge amount of padding width to my buttons and they are different sizes depending on what is entered in the value. Does anyone have a solution for this?

My code is as follows:


.subadd { WIDTH: 250px; HEIGHT: 27px; }

...

<input type=&quot;submit&quot; name=&quot;subadd&quot; class=&quot;subadd&quot; value=&quot;Save & Enter Additional Information&quot;>
<input type=&quot;submit&quot; name=&quot;subret&quot; class=&quot;subadd&quot; value=&quot;Save & Return to Main Menu&quot;>
<input type=&quot;button&quot; name=&quot;rtmain&quot; class=&quot;subadd&quot; value=&quot;Return to Main Menu Without Saving&quot;>

 
I fought with this for a long time, finally I ended up making images for buttons instead, there were too many inconsistencies between all of the browsers we supported :(

Sorry, maybe there's a better answer, but I never found it. (I got pretty close adding non-breaking spaces around the values, but that was, ummm... ugly)

-Scott
 
I tried adding padding to my buttons to make them the size I wanted. It works fine in IE, but NN not only ignores the padding, for some reason it stacks the buttons VERTICALLY! I guess if you're aiming to suit NN you just can't do it (big surprise).
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Well, I've fought with this all day and since my default intranet browser is NN, then I'm working on the image route. Thanks anyway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top