CSS Classes

jQuery CSS Classes

You can use different types of CSS classes to style the elements as described in the below sections.

Global Classes

The following classes can be used as global classes on jQuery Mobile widgets −

Sr.No.Class & Description
1ui-corner-allIt displays the elements with rounded corners.
2ui-shadowIt displays the shadow for the elements.
3ui-overlay-shadowIt displays the overlay shadow for the elements.
4ui-miniIt displays the smaller elements.

Button Classes

The following table lists button classes that are used with anchor or button elements −

Sr.No.Class & Description
1ui-btnIt specifies that the element will be styled as button.
2ui-btn-inlineIt shows the button as inline element which saves the space as needed for the label.
3ui-btn-icon-topIt places the icon above the text.
4ui-btn-icon-rightIt places the icon right of the text.
5ui-btn-icon-bottomIt places the icon below the text.
6ui-btn-icon-leftIt places the icon left of the text.
7ui-btn-icon-notextIt shows the only icon.
8ui-btn-a|bIt displays the color of the button (“a” will be the default background color i.e. gray and “b” will change the background color to black).

Icon Classes

The following table lists icon classes that are used with anchor or button elements −

Sr.No.Class & Description
1ui-icon-actionIt shows the action icon.
2ui-icon-alertIt display the exclamation mark inside a triangle.
3ui-icon-arrow-d-lIt specifies down with left arrow.
4ui-icon-arrow-d-rIt specifies down with right arrow.
5ui-icon-arrow-u-lIt specifies up with left arrow.
6ui-icon-arrow-u-rIt specifies up with right arrow.
7ui-icon-arrow-lIt specifies the left arrow.
8ui-icon-arrow-rIt specifies the right arrow.
9ui-icon-arrow-uIt specifies the up arrow.
10ui-icon-arrow-dIt specifies the down arrow.
11ui-icon-barsIt shows the 3 horizontal bars one above the other.
12ui-icon-bulletsIt shows the 3 horizontal bullets one above the other.
13ui-icon-carat-dIt displays the carat to down.
14ui-icon-carat-lIt displays the carat to left.
15ui-icon-carat-rIt displays the carat to right.
16ui-icon-carat-uIt displays the carat to up.
17ui-icon-checkIt shows the checkmark icon.
18ui-icon-commentIt specifies the comment or message.
19ui-icon-forbiddenIt displays the forbidden icon.
20ui-icon-forwardIt specifies the forward icon.
21ui-icon-navigationIt specifies the navigation icon.
22ui-icon-recycleIt displays the recycle icon.
23ui-icon-refreshIt shows the refresh icon.
24ui-icon-tagIt indicates the tag icon.
25ui-icon-videoIt indicates the video or camera icon.

Theme Classes

It provides two different types of themes such as theme “a” and theme “b” to customize the look of the application. You can create your own theme classes by appending swatch letter (a-z). Following table lists theme classes which are specified from letter a to z.

Sr.No.Class & Description
1ui-bar-(a-z)It displays the color for bar including headers, footers, and other bars in the page.
2ui-body-(a-z)It displays the color for content block including listview, popups, sliders, panels, loaders, etc.
3ui-btn-(a-z)It displays the color for button.
4ui-group-theme-(a-z)It displays the color for controlgroups, listviews, and collapsible sets.
5ui-overlay-(a-z)It displays the background color for popup, dialog, and page containers.
6ui-page-theme-(a-z)It displays the color for pages.

Grid Classes

Following table lists grid classes that are used with equal width, no border, background, margin or padding.

Sr.No.Grid ClassColumnsColumn WidthsCorresponds To
1ui-grid-solo1100%ui-block-a
2ui-grid-a250%/50%ui-block-a|b
3ui-grid-b333%/33%/33%ui-block-a|b|c
4ui-grid-c425%/25%/25%/25%ui-block-a|b|c|d
5ui-grid-d520%/20%/20%/20%/20%ui-block-a|b|c|d|e

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *