CSS Tips and Tricks
The CSS code provided here are examples only and provided without support. Your site may be configured differently. Examples may or may not work on some devices and may not follow best practices for accessibility. Please test accordingly.
- 1 Hiding Quiz Question Titles
- 2 Replacing Quiz Question Titles
- 3 Changing main menu text color and background color
- 4 Add message to all pages (for example, alerts about planned site maintenance)
- 5 Hiding course complete table listing course objects
- 6 Hide social media icons
- 7 Hiding calendar links
- 8 Hiding the learning group and other group's left column
- 9 Hide the price on a course landing page
- 10 Hide the Take Course button
- 11 Hide the Accreditation statement on a course landing page
- 12 Hide the Accreditation tab on all course landing pages
- 13 Hide the Accreditation tab on a single course landing page
- 14 Hide the Accreditation Period on all course landing pages
- 15 Hide the Accreditation Period on a single course landing page
- 16 Remove grey table borders on course pages
- 17 Target a single page for a CSS rule
- 18 Widen the Attributes column in the cart
- 19 Hide the QTY column in the cart
- 20 Hide the cart icon
- 21 Hide the Sell Price search facet (in left sidebar)
- 22 Hide the Registration status facet (in left sidebar)
- 23 Hide the Cost column in most views
- 24 Hide Core Profile Field
- 25 Remove table borders
- 26 Display a message mimicking Drupal pdm alerts/warnings
Hiding Quiz Question Titles
To hide quiz question titles, add the following to your global CSS
.page-node-#### div.quiz-question-wrapper h2 {display: none;}
and replace #### with the node ID containing the quiz question.
Replacing Quiz Question Titles
.page-node-#### div.quiz-question-wrapper h2:after {
content: 'REPLACEMENT TEXT';
visibility: visible;
position: absolute;
top: 0;
left: 0;
}
.page-node-#### div.quiz-question-wrapper h2 {
/* display: none; */
visibility: hidden;
position: relative;
}
and replace #### with the node ID containing the quiz question.
Changing main menu text color and background color
To change the main menu text color to white, add the following to your global CSS
#main-menu li a {color:#fff;}
#main-menu li a:hover {color:#fff;}
To remove borders from main menu links, add the following to your global CSS
To remove the special styling of the main menu "active trail" link, add the following to your global CSS
To remove the background gradient from the main menu, add the following to your global CSS
To change the background color of the main menu to blue, add the following to your global CSS
To change the background color of the main menu dropdown to blue, add the following to your global CSS
Add message to all pages (for example, alerts about planned site maintenance)
Hiding course complete table listing course objects
Hide social media icons
Hiding calendar links
To hide the calendar links until a learner is enrolled in the course.
Hiding the learning group and other group's left column
Hide the price on a course landing page
Replace #### with the node id of the appropriate course.
Hide the Take Course button
Replace #### with the node id of the appropriate course.
Hide the Accreditation statement on a course landing page
.page-node-1260 .course-credit-ama .course-credit-description {display: none;}
Hide the Accreditation tab on all course landing pages
Hide the Accreditation tab on a single course landing page
Replace #### with the node ID of the course.
Hide the Accreditation Period on all course landing pages
Hide the Accreditation Period on a single course landing page
Replace #### with the node ID of the course.
Remove grey table borders on couse landing pages
Remove grey table borders on course pages
Target a single page for a CSS rule
In this sample, the h3. pane-title will be not be displayed on the specified node.
and replace #### with the node ID of the page.
Widen the Attributes column in the cart
Hide the QTY column in the cart
Hide the cart icon
Hide the Sell Price search facet (in left sidebar)
Hide the Registration status facet (in left sidebar)
Hide the Cost column in most views
Hide Core Profile Field
Remove table borders
This is done inline when editing content rather than as global CSS.
Display a message mimicking Drupal pdm alerts/warnings
Create a block with Full HTML text. In the source code, place the following html (note the two div tags includes a wrapper), with a customized message. The color is updated by changing the classes: pdm-status
= green, pdm-warning
= yellow, pdm-error
= red