Tested tool guide
Tested browser tools
Checked August 16, 2026
What CSS Tooltip Generator does, with a checked example
Pick where the tooltip sits relative to its trigger, which way the arrow points and how far off-center, the background and text colors, corner radius, and an entrance animation. The tool returns the HTML structure plus one block of CSS to paste. Show and hide are pure CSS - hovering the trigger toggles the tooltip, and the arrow is a bordered ::after triangle - so no JavaScript is involved. The common surprise: pasting the code into a page where an ancestor has overflow: hidden or its own positioning silently clips the tooltip or moves it away from the trigger.
Worked example
A concrete input and expected output from the current implementation.
Input
Position: above the trigger. Arrow: centered, pointing down. Width: 160px. Background: #111827, text: #f9fafb. Radius: 8px. Animation: fade-in, 150ms.
->
Expected output
<div class="tooltip">Hover me<span class="tooltip-text">Tooltip text</span></div>
.tooltip { position: relative; display: inline-block; }
.tooltip-text {
position: absolute;
bottom: calc(100% + 8px);
left: 50%;
transform: translateX(-50%);
width: 160px;
padding: 8px 12px;
background: #111827;
color: #f9fafb;
border-radius: 8px;
opacity: 0;
pointer-events: none;
transition: opacity 150ms ease;
}
.tooltip:hover .tooltip-text { opacity: 1; }
.tooltip-text::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border: 5px solid transparent;
border-top-color: #111827;
} The wrapper is position: relative, so the tooltip anchors to it: bottom: calc(100% + 8px) floats the box above with an 8px gap, and left: 50% plus translateX(-50%) centers it. The ::after triangle is 10px wide (5px border per side); at left: 50% its left edge starts at center, so margin-left: -5px recenters it. Hover flips opacity for the 150ms fade; no JavaScript.