The Stack Overflow podcast is back! Listen to an interview with our new CEO.

New answers tagged

0

But what if the new image is of a different ratio than the previous one? Doesn't it make more sense to override the former settings to ensure the new image is correctly sized?


1

The effect you are looking for can be achieved by adding the box-shadow to the link element directly. The span is totally unnecessary: Just change this: a { color: #545454; text-decoration: none; } a span:hover { color: #000000; box-shadow: inset 0 -10px #ffbe76; } a span{ box-shadow: inset 0 -10px #f6e58d; } To this: a { color: #545454; ...


Top 50 recent answers are included