.highlight { position: relative; } .highlight button { position: absolute; top: 4px; right: 4px; opacity: 0; transition: opacity 0.1s linear; } .highlight:hover button { opacity: 1 }