I am trying to use tooltips to explain some botanical terms on my web pages. The page in question is here:
http://wildadirondacks.org/adirondac...elliptica.html
The tooltips appear in the bulleted list to the right of the photo under the discussion of flowers.
A few days ago, I was having a problem with the tooltips cutting off, but (thanks to Deadweight, who pointed out that I had to change my z-index to 100), that problem has been solved. The tooltips display correctly (no cutoffs) on my desktop in Chrome, Opera, Firefox, Internet Explorer, Safari, and Microsoft Edge. On my iPad, the tooltips now display correctly on Firefox and Opera Mini.
However, the tooltips do not work at all on my iPad in either Chrome or Safari. When I touch the trigger word, nothing happens; no tooltip appears.
Here is my html:
Code:
<div class="figureLeft">
<img src="images/Adirondack-Wildflowers-Shinleaf-Pyrola-elliptica-Craig-Wood-7-July-2011-81.jpg" alt="Wildflowers of the Adirondack Park: Shinleaf near Craig Wood Golf Course in Lake Placid (7 July 2011)." title="Wildflowers of the Adirondack Park: Shinleaf near Craig Wood Golf Course in Lake Placid (7 July 2011)." class="imageRight">
<div class="figcaptionleft">
<a href="adirondack-wildflowers.html">Wildflowers of the Adirondacks</a>: Shinleaf flowers grow around the stem and have a cluster of orange-tipped <div class="tooltip">stamens<span class="tooltiptext">The male part of the flower, made up of the filament and anther.</span></div> and a long curved <div class="tooltip">style<span class="tooltiptext">The narrow part of the pistil.</span>
</div>. Shinleaf near Craig Wood Golf Course in Lake Placid (7 July 2011).</div></div>
<ul class="rightSectionLeftImageList">
<li class="rightSectionLeftImageList">Each stalk has three to 21 greenish-white, waxy flowers. The long flower stalk is hairless.
The flowers are <div class="tooltip">alternate<span class="tooltiptext">Appearing singly along the stems, not in pairs.</span></div> and appear along the upper part of the stem.</li>
<li class="rightSectionLeftImageList">In contrast to <a href="adirondack-wildflowers-one-sided-wintergreen-orthilia-secunda.html">One-sided Wintergreen</a> (<em>Orthilia secunda</em>), another member of the <em>Ericaceae</em> family, Shinleaf flowers are not one-sided; they appear around all sides of the flower stem. </li>
<li class="rightSectionLeftImageList">Each flower is about ⅓ inch wide.*Shinleaf flowers have five oval petals and a cluster of orange-tipped <div class="tooltip">stamens<span class="tooltiptext">The male part of the flower, made up of the filament and anther.</span></div> under the upper petals. The flowers also have a long curved, pale green
<div class="tooltip">style<span class="tooltiptext">The narrow part of the pistil.</span>
</div>, which is the long, tube-like part of the <div class="tooltip">pistil<span class="tooltiptext">The female part of the flower made up of the stigma, style, and ovary.</span>
</div>. The petals may have greenish veins. The
<div class="tooltip">sepals<span class="tooltiptext">The parts that look like little green leaves and cover the outside of a flower bud to protect the flower before it opens.</span>
</div> are triangular, about as long as wide and about ¼ as long as the petals. </li></ul>
Here is my css:
Code:
/* Tooltip container */
.tooltip {
position: relative;
display: inline-block;
border-bottom: 1px dotted black; /* If you want dots under the hoverable text */
}
/* Tooltip text */
.tooltip .tooltiptext {
visibility: hidden;
width: 200px;
background-color: #555;
color: #fff;
text-align: left;
padding: 5px;
border-radius: 4px;
font-size: 14px;
/* Position the tooltip text */
position: absolute;
z-index: 100;
bottom: 125%;
left: 50%;
margin-left: -100px;
/* Fade in tooltip */
opacity: 0;
transition: opacity 1s;
}
/* Tooltip arrow */
.tooltip .tooltiptext::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: #555 transparent transparent transparent;
}
/* Show the tooltip text when you mouse over the tooltip container */
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
I have searched the forums for an answer, but was unable to find one.
What am I doing wrong? I am posting this in the CSS forum, since I think it may be a problem with my CSS.
Bookmarks