11 CSS and HTML Coding

If you are interested in using CSS to alter the default settings within your book’s theme, below are a few resources and coding examples:

11.1 Tool Tip

CSS

(Enter in Custom Styles)

HTML

(Enter in Chapter Text Editor)

Example in Pressbooks

/* Tooltip container */

.tooltip {

position: relative;

display: inline-block;

border-bottom: 1px dotted black;

}

/* Tooltip text */

.tooltip .tooltiptext {

visibility: hidden;

width: 300px;

background-color: GhostWhite;

color: #000000;

text-align: left;

padding: 5px 0;

border-radius: 6px;

position: absolute;

z-index: 1;

}

.tooltip:hover .tooltiptext {

visibility: visible;

}

<div class=”tooltip”>ENTER THE TEXT YOU WANT TO SEE HERE

<span class=”tooltiptext”>ENTER THE TEXT YOU WILL SEE WHEN NOTE IS HOVERED OVER span></div>

Example:

<div class=”tooltip”><span style=”color: #000080;”><span style=”color: #000080;”><span style=”color: #ff0000;”><strong>INSTRUCTOR NOTE</strong></span>

</span></span><span class=”tooltiptext”>This activity can be facilitated in a face-to-face setting, but would be best suited to an online modality.</span></div>

**THIS INCLUDES OTHER FORMATTING (COLOUR, BOLD)

image

image

Example:

imageimage

License

Icon for the Creative Commons Attribution-ShareAlike 4.0 International License

Pressbooks OER Publication Guide, NorQuest College Copyright © 2022 by NorQuest College is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License, except where otherwise noted.

Share This Book