Note that there are some explanatory texts on larger screens.

plurals
  1. PONeed Advice On Simple CSS Tooltip
    primarykey
    data
    text
    <p>I was wondering if anybody could tell me why this isn't working. I've been working on a simple CSS tooltip method, but I just cannot seem to lock it down. On Firefox, the tooltips show up in different locations. On IE, only the first tooltip works.</p> <p>Thanks, and have a great day.</p> <pre><code>&lt;/html&gt; &lt;/head&gt; &lt;title&gt; CSS Tooltip Test &lt;/title&gt; &lt;style type="text/css"&gt; body {padding: 0px; margin: 0px; font: 80%; font-family: sans-serif;} div.container {padding: 10px 10px 10px 25px; } thead {background-color: #00f; color: #fff;} th { text-align: center; padding: 4px 6px 4px 6px; } td { text-align: center; padding: 4px 6px 4px 6px; } a:link {text-decoration: none;} a:hover {text-decoration: none;} a:visited {text-decoration: none;} a.myLink {position: relative; z-index: 24;} a.myLink:hover {z-index: 25;} a.myLink span.tooltip {display: none;} a.myLink:hover span.tooltip {display: block; position: absolute; overflow: visible; top: 0em; left: 8em; width: 20em; color: #fff; background-color: #000; border: solid 1px #c6d880; padding: 2px 4px 2px 4px; font-family: serif; font-size: 1em; font-weight: 700; text-align: left; z-index: 100;} td.myCell {position: relative; z-index: 24;} td.myCell:hover {z-index: 25;} td.myCell span.tooltip {display: none;} td.myCell:hover span.tooltip {display: block; position: absolute; overflow: visible; top: 0em; left: 8em; width: 20em; color: #fff; background-color: #000; border: solid 1px #c6d880; padding: 2px 4px 2px 4px; font-family: serif; font-size: 1em; font-weight: 700; text-align: left; z-index: 100;} button.myButton {position: relative; z-index: 24;} button.myButton:hover {z-index: 25;} button.myButton span.tooltip {display: none;} button.myButton:hover span.tooltip {display: block; position: absolute; overflow: visible; top: 0em; left: 8em; width: 20em; color: #fff; background-color: #000; border: solid 1px #c6d880; padding: 2px 4px 2px 4px; font-family: serif; font-size: 1em; font-weight: 700; text-align: left; z-index: 100;} &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="container"&gt; &lt;table border="1"&gt; &lt;thead&gt; &lt;tr&gt;&lt;th&gt; CSS Tooltip Test Table &lt;/th&gt;&lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt;&lt;td&gt;&lt;a class="myLink" href="http://www.google.com/" target="_blank"&gt;&lt;span class="tooltip"&gt;this is a tooltip for cell 1&lt;/span&gt;Go To Google&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td class="myCell"&gt;&lt;span class="tooltip"&gt;this is a tooltip for cell 2&lt;/span&gt;This Is Cell 2&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;button class="myButton" type="submit"&gt;&lt;span class="tooltip"&gt;this is a tooltip for cell 3&lt;/span&gt;A Clicky Button&lt;/button&gt;&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload