Reputation: 4495
Say I wanted to use a glyphicon as a submit button for a form. How would I go about doing this?
To elaborate, I want no 'visible' elements of a traditional button. Just a glyphicon, as it would appear normally in text.
I have tried using <button>
and <input type='button'>
with the glyphicon classes, and (as one would expect), no luck.
Upvotes: 8
Views: 30099
Reputation: 54619
You can use the .btn-link
class to have a button appear as a text link:
<form>
...
<button type="submit" class="btn btn-link">
<span class="glyphicon glyphicon-star"></span>
</button>
</form>
See this demo fiddle
Upvotes: 30
Reputation: 4063
<button type="button" class="btn btn-default">
<span class="glyphicon glyphicon-search"></span>
</button>
Upvotes: 0