If I have this line of code:
<input type="submit" class="mybutton" name="add" value="Add new"/>
How can I use CSS to style the buttons value?
I need to add an image before it’s value, therefore I’d need this line of code at the value output:
<span class="add">Add new</span>
I tried things like:
<input type="submit" class="mybutton" name="add" value="">
<span class="add">Add new</span></input>
haha, but this totally doesn’t make any sense.
Anyone a good tip?
EDIT
Wow thanks for the great fast responses. Forgot to mention that I use a .CSS file of “sexybuttons”, so I can’t change the styling and need other approach.
<button type="submit">
Is what I was looking for. Thanks alot all.
You could try using the
buttontag instead ofinput.Or you could set a
background-imagefor the button using CSS.