Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Button text with multiple colors

I have an input button element which I would like to include the words "Take me there >" but I want to make the angle bracket a different color from the rest of the text.

Is this possible? I'm happy to use a javascript or jquery fix if necessary.

like image 318
Tom Avatar asked Jan 17 '23 02:01

Tom


1 Answers

How about this: http://jsfiddle.net/w3KHd/1/

Use a button with a span inside which sets the font color to whatever color you want. E.g.:

<button>Take me there <span style="color: red"> &gt; </span></button>

Update:

If you want to use the button as a submit button use:

<button type="submit">Take me there <span style="color: red"> &gt; </span></button>
like image 180
Horen Avatar answered Jan 23 '23 13:01

Horen