why font awesome not working in zk9

asked 2020-02-13 18:10:35 +0800

Tharun gravatar image Tharun
1 1

font awesome not working in zk 9

delete flag offensive retag edit


ZK 9 integrates Font Awesome 4.7.0. If you run into issues please provide details and examples so people can help

jeanher ( 2020-02-14 09:11:11 +0800 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2020-02-14 16:19:06 +0800

xnavarro gravatar image xnavarro
1 1

updated 2020-02-14 16:20:16 +0800

I am using fontawesome icons in zk9. Example:

<a  iconSclass="z-icon-refresh z-icon-lg" ></a>
link publish delete flag offensive edit

answered 2020-02-27 17:54:05 +0800

Martazza gravatar image Martazza

ZK intregrates since 8.5.2 Font Awesome 4.7.0.

The iconSclass not only applies to font awesome icons ("z-icon-" classes): Any css class can be applied to customize, for example, the bootstrap glyphicons can be used here too,

    <button iconSclass="glyphicon glyphicon-envelope" />

Since the web font is loaded after the character is being displayed if there is no cache, ZK doesn't know if the web font is ready when initializing. Therefore using hflex="min" with iconSclass may not get the desired result. Moreover, the final width of icons might not be the same. To make the width of icons always be fixed, add z-icon-fw.

<window hflex="min">
    <button iconSclass="z-icon-fw z-icon-home" />
    <button iconSclass="z-icon-fw z-icon-bell z-icon-spin" />

I'm currently using ZK 9.0.0 and it works

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools




Asked: 2020-02-13 18:10:35 +0800

Seen: 14 times

Last updated: Feb 27

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More