N
N
nutritsio2017-04-02 12:25:34
css
nutritsio, 2017-04-02 12:25:34

How to adjust padding to hover?

Hey everyone, the problem comes up is that there is a shear on the hover effect. I understand that this is a game of that 1px that is set in border , but I can’t figure out how to solve this problem.
Code: https://jsfiddle.net/14zu3je5/
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Andrey Fedorov, 2017-04-02
@nutritsio

What? What is 1 pixel border? You have padding on hover set to 12 pixels. https://jsfiddle.net/Ltnsep3j/1/

M
Max Medar, 2017-04-02
@MedVedar

https://jsfiddle.net/14zu3je5/2/

D
Dmitry, 2017-04-02
@letehaha

I would also set a link display: blockso that the middle points do not run into each other
https://jsfiddle.net/t1eh1q8w/
And in such cases, it's better to do the initial one borderwith transparency ( transparent). Because if you change the background, then you also have to change the color of the original border-a.

S
Sergey Shilov, 2017-04-02
@Olivoin

There is no code or example, but I can assume that the element should initially have a border with color transparent

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question