Form Layout: CSS Classes
You can use the predefined CSS classes, which are listed in the following table, to adjust the color settings and layout of templates. These classes are defined in the FrontendSources/screen/static/basic-layout.css file of the instance folder.
Class | Description | HTML Example |
---|---|---|
col-auto |
Can be applied to any element (however, it is designed to be used with buttons). This predefined CSS class causesan element to have its caption fully visible and does not include excessive space in any screen size, as shown for the Shop for Rates button in the following screenshots for a narrow screen and a wide screen. That is, the width of the button is fixed for any screen size. |
|
col-N, where N is a number from 1 to
12 |
Can be applied to any element. This predefined CSS class specifies the width of a control in columns.
You can use these classes to organize multiple UI controls inside a field area (which are implemented with Merge in PXLayoutRule in ASPX). For examples of the organization of multiple UI controls in a field area, see Form Layout: Adding a Control Next to a Field. Note:
Controls that span multiple columns of controls (which are implemented with
ColumnSpan in PXLayoutRule in ASPX) should
be avoided. You should use multiline text boxes instead. For details, see Form Layout: Configuring a Multiline Text Box. |
|
col-lg-X, col-md-X,
col-sm-X, where X is a number from 1 to
12 |
Can be applied to any element. This predefined CSS class specifies the width of a control in columns for different types of screens:
In the rules, the number from 1 to 12 indicates the width in columns, where 1 is the smallest width and 12 is the full width of the parent control. |
|
equal-height | Can be applied to qp-template. This predefined CSS class indicates that the columns in the template should be aligned in height. |
|
framed-section | Can be applied to any container. This predefined CSS class displays a container in a separate gray frame. |
|
full-width | Can be applied to qp-template .This predefined CSS class stretches the right side of the template to the right side of the screen, ignoring the maximum size of the form, which is 1600 px. We recommend that you use this CSS class if you have a wide grid inside the template. |
|
h-stack | Can be applied to any container. This predefined CSS class defines the list of elements rendered horizontally. |
|
highlights-section | Can be applied to qp-fieldset .This predefined CSS class defines the style for the pane with a blue background. |
|
label-size-<SIZE> | Can be applied to any container. This predefined CSS class specifies
the width of the labels in the container starting from Note: We do not recommend overusing this set of CSS
classes. Ideally, all labels on a form should have the same
size. <SIZE> can have the following values:
|
|
no-label |
Can be applied to any element. This predefined CSS class specifies that the element and all its nested elements
do not have labels. However, you can override this behavior in any nested element
by specifying You do not need to use |
In the following code, the One field has a label of size
S, the Two field has no label, the Three
field has no label, and the Four field has a label of size
M.
|
no-stretch |
Can be applied to any container. This predefined CSS class prevents the element from being stretched over the height of the whole form or the area of a form, such as a tab. (By default, the grid is stretched over the height of the whole area.) |
|
stretch |
Can be applied to any container. This predefined CSS class stretches the element over the height of the whole screen or the area of a screen, such as a tab. The class is applied by default to |
|
transparent-section |
Can be applied to This predefined CSS class defines the style of the pane with the transparent background. We recommend that you use transparency only for fieldsets with a maximum of two rows of controls. The following screenshot shows an element in a transparent fieldset. The following screenshot shows a selected check box in a transparent fieldset. |
|
v-stack |
Can be applied to any container. This predefined CSS class defines the list of elements rendered vertically. The elements are rendered vertically by default; therefore, in most cases, there is no need to use this class. |
|