Originally Posted by
earmsby
I would love to use font-awesome icons in place of some text on CSS buttons. I tried searching this thread and the whole forum but am having trouble finding any mention of this so apologies if this has been discussed somewhere.
I thought maybe I could simply replace the button text in the language file with the html code for the FA icon, but when I tried that, for some reason, some kind of default looking image replaced my CSS button.
Has anyone tried this successfully? Thanks for any advice or pointers!
I do this on my site buttons.. if the css button is inside of a form you use one format and if its outside you use another format...CSS buttons are the alt tag and not the image..
includes/languages/english/YOUR_TEMPLATE/button_names.php
inside of forms would be..
Code:
define('BUTTON_UNSUBSCRIBE', ' Unsubscribe');
define('BUTTON_UPDATE_ALT', ' Update');
define('IMAGE_DELETE', ' Remove');
define('BUTTON_WRITE_REVIEW_ALT', ' Write Review');
define('BUTTON_CANCEL_REVIEW_ALT', ' Cancel');
define('ICON_UPDATE_ALT', ' Update Cart');
define('BUTTON_LOOKUP_ALT', ' Lookup');
outside of forms..
Code:
define('BUTTON_CREATE_ACCOUNT_ALT', '<i class="fa fa-user-plus"></i> Sign Up');
define('BUTTON_LOG_OFF_ALT', '<i class="fa fa-star"></i> Log Off');
define('BUTTON_ADD_ADDRESS_ALT', '<i class="fa fa-pencil-square-o"></i> Add Address');
define('BUTTON_BACK_ALT', '<i class="fa fa-undo"></i> Back');
define('BUTTON_BUY_NOW_ALT', '<i class="fa fa-star"></i> Buy Now');
define('BUTTON_CANCEL_ALT', '<i class="fa fa-star"></i> Cancel');
define('BUTTON_CHANGE_ADDRESS_ALT', '<i class="fa fa-star"></i> Change Address');
if the button is showing a default charter, then the wrong format was used.
Bookmarks