3 replies [Last post]
dmelosi
Offline
newbie
Last seen: 9 years 42 weeks ago
Joined: 2004-12-29
Posts: 4
Points: 0

Hello,
I am using a submit button from Front Page. The submit button changes in size depending on the text you put in there.

example the following is a link that I have using the button.

<FORM METHOD="POST" name="NoteAdd" action="Tasks/NoteAdd.asp">
<input type="hidden" name="whereFrom" value=d>
<p align="center"><font face="Verdana,Arial,Helvetica" size="2">
<input type="submit" value="Add" name="btnSubmit"></font></td></form>

Whenever you type in the value="Add" the size of the button is different than if you typed in a longer name such as value="Print Record"

I would like to make it so the width of the buttons are the same. Is there a way using CSS to do this?

Thank You,

Dave

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 hour 25 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9229
Points: 3235

submit button

< input type="submit" value="Add" style="width: 200px;" />

If you don't have to support obsolete browsers like IE,
<style type="text/css">
...
input[type="submit"] {
    width: 200px;
    }
...
</style>

cheers,

gary

Unplanned code results in a tangled wad of brain-cramping confusion.

There are enough html & css demos and tutorials to be interesting. Please visit.

dmelosi
Offline
newbie
Last seen: 9 years 42 weeks ago
Joined: 2004-12-29
Posts: 4
Points: 0

submit button

Thank You

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 14 hours 7 min ago
London
Timezone: GMT+1
Joined: 2004-06-06
Posts: 15663
Points: 2801

submit button

dmelosi,
Rather than post the same question twice under different titles if you have failed to gain a response, could you please just *bump* up the original as it gets confusing when people start answering the same question on different threads.

Hugo.
Moderator.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me