How to remove the offset of the icons when you zoom buttons?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
47 views
Hi all. Need help. There is a product card. When hovering over different buttons with the effect of increasing. But icon inside the button are moved to the right a few pixels. How to overcome this glitch? Thanks in advance. Link to example
by | 47 views

1 Answer

0 like 0 dislike
Since the icons are already absolute positioning, then locate it using the transform and the coordinates of the top left and the button to put the sizes in even numbers:
.act-btn_circ .icon { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); } .act-btn_circ { display: block; width: 36px; height: 36px; border-radius: 50%; background-color: #fff; position: relative; box-shadow: 2px 4px 4px 0 rgba(0, 0, 0, 0.15); padding: 0; }
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
4 answers
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users