Styling and Appearance
jQWidgets uses a pair of css files - jqx.base.css and jqx.[theme name].css. The
base stylesheet creates the styles related to the widget's layout like margin, padding,
border-width, position. The second css file applies the widget's colors and backgrounds.
The jqx.base.css should be included before the second CSS file.
Below is the list of CSS classes used by jqxButtons.
jqxButton, jqxRepeatButton, jqxLinkButton and jqxToggleButton Style
- jqx-button - applied to jqxButton's outer div element.
- jqx-link - applied to the jqxLinkButton's anchor element.
- jqx-fill-state-normal - applied to button when it's state is default/normal.
- jqx-fill-state-hover - applied to button when it's state is hovered i.e the mouse
cursor is over the button.
- jqx-fill-state-pressed - applied to button when it's state is pressed i.e the mouse
button is down.
- jqx-fill-state-disabled - applied to button it is disabled.
When you create a custom style with colors and backgrounds for jqxButton, jqxRepeatButton,
jqxLinkButton and jqxToggleButton, you need to do the following:
- Add the above CSS classes related to jqxButtons
- After each CSS class, add your theme name.
- To apply your custom style to jqxButtons, you need to set its 'theme' property(option)
to point to your theme name string.
- The sample below demonstrates how to set the 'Energy Blue' theme to jqxButtons.