.hover path { stroke: #ccc; } .hover text { fill: #ccc; } .hover g.primary text { fill: black; font-weight: bold; } .hover g.secondary text { fill: #333; } .hover path.primary { stroke: #333; stroke-opacity: 1; } div.tooltip { position: absolute; text-align: left; width: auto; height: auto; padding: 12px; font: 14px sans-serif; background: lightsteelblue; border: 0; border-radius: 8px; /*pointer-events: none;*/ } #packing, #circle { width: 1200px; height: 1200px; }