x
 
Create New Page
 View Previous Changes    ( Last updated by Lisa Wess )

Style Form Buttons In Safari

While it is often a better idea to not style form elements (for reasons outside the scope of this little trickery), sometimes you just want things to blend nicely. While styling the <input> tags (via CSS) work fine in most browsers, Safari (for OS/X) feels the need to embed its own styling based on the theme you are using. There is an easy way around this; simply change your <input> tags to <button>...</button> tags. As an example, I’ve taken the default tags from the Comment Submission Form, and have made the necessary changes.

Default

<input type="submit" name="submit" value="Submit" />
<
input type="submit" name="preview" value="Preview" />

Modified

<button type="submit" name="submit">Submit</button>
<
button type="submit" name="preview">Preview</button>

From here, you’re easily able to style your new buttons however you like.

Category:Tricks Category:Templates Category:CSS

Categories: