how to change submit button font on contact form

css, html, webforms

Solution

Use the `font-family` CSS property :

input[type=submit]{
    font-family: 'Orator Std';
}

To be all-browsers compatible, add `class="mysubmitbutton"` to your button, and use `input.mysubmitbutton` instead of `input[type=submit]`.

Edit : If you want to do this directly in the HTML code, do it on the `input` tag :

<input type="submit" value="Submit" style="font-family:'Orator Std';" />

I am not sure that Orator Std is a native CSS font though... For custom fonts usage in HTML/CSS, see this question.

Problem

The 7th line from the end I tried to add in some CSS but it won't change the font on the button. Is there a way to do it in CSS or PHP? (Or maybe a way that actually works in HTML) Thanks in advance! I'm really new at this. here's my code: ``` <form name="htmlform" method="post" action="something_sendform.php"> <table width="450px"> </tr> <tr> <td valign="top"> <label for="first_name">First Name *</label> </td> <td valign="top"> <input type="text" name="first_name" maxlength="50" size="30"> </td> </tr> <tr> <td valign="top""> <label for="last_name">Last Name *</label> </td> <td valign="top"> <input type="text" name="last_name" maxlength="50" size="30"> </td> </tr> <tr> <td valign="top"> <label for="email">Email Address *</label> </td> <td valign="top"> <input type="text" name="email" maxlength="80" size="30"> </td> </tr> <tr> <td valign="top"> <label for="telephone">Telephone Number</label> </td> <td valign="top"> <input type="text" name="telephone" maxlength="30" size="30"> </td> </tr> <tr> <td valign="top"> <label for="comments">Comments *</label> </td> <td valign="top"> <textarea name="comments" maxlength="1000" cols="25" rows="6"></textarea> </td> </tr> <tr style="font-family:Orator Std"> <td colspan="2" style="text-align:center"> <input type="submit" value="Submit"> </td> </tr> </table> </form> ```

Original source

Related problems