Atadj
Atadj

Reputation: 7180

How to pass multiple characters as single character to input value?

When you do something like <input type="submit" value="Submit"> the button will be named Submit (because that's its value).

But what if I'm using font that doesn't have "A" letter attached to "A" position etc.? Instead it uses its own space for characters and uses for instance \f002 (this is single character). It is vector icons font and I'd like to use one icon as value of submit input.

Using <input type="submit" value="\f002"> is going to just print \f002 and not that single icon. How can I convert this?

PS
It works excellent when I use content: "\f002"; in style.css. It converts this full string to an icon.

PPS
Icons set: http://fortawesome.github.com/Font-Awesome/

Upvotes: 0

Views: 1157

Answers (2)

Atadj
Atadj

Reputation: 7180

Okay, I made it work. The answer: &#xf002; but I don't have explanation - I just remember that some time ago I was struggling with similar issue and adding x helped.

Upvotes: 1

intersum
intersum

Reputation: 610

Maybe you'd try to add a class attribute to the input button?
i.e.: <input type="submit" value="Submit" class="myClass">

Take a look at this article: http://www.webreference.com/programming/css_stylish/index.html

Upvotes: 0

Related Questions