position: absolute; right: 4px; top: 8px; } .highlight-wrap:hover .copy-btn, .highlight-wrap .copy-btn:focus { opacity: 1 } .highlight-wrap { position: relative; }