M
M
Maxim Akhmerov2018-03-08 10:43:41
css
Maxim Akhmerov, 2018-03-08 10:43:41

How to solve the problem with the border property on hover?

When hovering over the extras in the nav bar (from bootstrap), I made the property that the block has a bottom frame, but it increases the size of the entire block, which is wrong, how to solve this problem without setting a fixed block height?
The box-sizing:border-box property does not work, I asked too much, it did not help

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Sklyarov, 2018-03-08
@Maksum70

Either set all the usual dice: , and change transparent to the color on hover, or simply add a strip from below through :before,:after. border-bottom: 1px solid transparent;

S
Sergey, 2018-03-08
@SKolt

It is done simply and in different ways: examples
Do not forget about prefixes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question