Example CSS Classes
Overview
CSS Classes can be used to change the layout of either a variable or an entire variable group. In order to create custom classes, knowledge of CSS is required. However some common CSS classes are defined below and can be used as is or easily modfied.
Content
A CSS class is defined on the Global Code tab of the Project Update page in the Styles (Css) section. The text in the Content column of the table below can be pasted into the Styles (Css) section. The CSS Class can then be used within the project at the Variable or Variable Group level. If using any of the examples below, the value in the CSS Class Name column is specifed in the variable or variable group CSS Class field.Â
The CSS class names are case-sensitive. The name entered in the CSS Class field for the variable or variable group must match the case of the CSS class name entered in the global code
Examples:
CSS Class Name |
Description |
Content |
---|---|---|
NoAnswer |
Hides the answer for a variable. |
.NoAnswer .AnswerPanel |
RedBackground |
Displays a red background for the variable. to create a CSS class with a different color background you would change the CSS Class name and the hexadecimal value to the desired color
|
.RedBackground |
WhiteFont |
Displays the text with a white font |
.WhiteFont |
Font12 |
Displays the text with 12point font-size |
.Font12 |
SmallerPickListFont10 |
Reduces the size of the text in a drop-down pick list variable |
.SmallerPickListFont10 .AnswerPanel select |
RadioButtonHeight30 |
Increases the vertical spacing between radio buttons for a Vertical Radio Button type variable |
.RadioButtonHeight30 .RadioButton |
RadioButtonWidth30 |
Increases the horizontal spacing between radio buttons for a Horizontal Radio Button type variable |
.RadioButtonWidth30 .RadioButton |
NoPaddingVar |
Removes all the built-in padding around a variable This CSS Class is only valid at the variable level
|
.NoPaddingVar |
NoPaddingVarRight |
Removes all the padding on the right side of the variable. This can be useful if you have two variables side-by-side and want them closer. |
.NoPaddingVarRight |
TopMargin10 |
When added to a variable's CSS class, adds a 10px space at the top of the variable. |
.TopMargin10 |
BottomMargin10 |
When added to a variable's CSS class, adds a 10px space at the bottom of the variable. |
.BottomMargin10 |
NoPaddingVG |
Removes all the built-in padding around all the variables in a variable group This CSS Class is only valid at the variable group level
|
.NoPaddingVG .VariablePanel |
LessPaddingVG |
Reduces the amount of padding around a variable This CSS Class is only valid at the variable group level
|
.LessPaddingVG .VariablePanel |
MatrixPromptHeader |
Forces the prompt width specified for all variable groups in the project with a matrix layout |
.MatrixPromptHeader |
MyMatrixPrompt |
When added to a variable group's CSS Class, forces the prompt width to the specified width |
.MyMatrixPrompt .PromptHeader |
MyMatrixAnswer |
When added to a variable group's CSS Class, forces the answer width to the specified width |
.MyMatrixAnswer .ValueHeader |
CenterHeadingX |
Will either left, center, or right justify prompt text. Replace "X" with a number to indicate font size, 1 = smallest and as you increase the number the font will get bigger |
 |