.link:hover { width: auto; height: 18px; background: black; border: 1px solid red; } With hover, the content part (the one that stands out in black) does not fit the size of the button itself. How to fix the situation?
.link:hover { width: auto; height: 18px; background: black; border: 1px solid red; } With hover, the content part (the one that stands out in black) does not fit the size of the button itself. How to fix the situation?
Probably, you can fix the property box-sizing:border-box .
The problem will be resolved through the general style for the hover button and button:
.link, .link:hover { height: 18px; }
When this is used, the box-sizing property is optional, but this can be added to the same selector.
Source: https://ru.stackoverflow.com/questions/582959/
All Articles