I am making component button with image inside. I removed borders of button, but there is strange line under the image, that can not been seen in inspector? Any clues?
Asked
Active
Viewed 53 times
0
-
That strange line depends on background color... – Krasnay Danil Jul 13 '20 at 01:44
-
Can you add a code snippet? – Anvay Jul 13 '20 at 04:15
2 Answers
1
that is because height of your button is 53px and height of image is 50px so u see a line which is a 3px leftover. give your image a height of 53px

Aryan Choudhary
- 492
- 1
- 8
- 14
-
I can read... I know that button height is 53... I am asking why button height is 53?! And how to make button take content height... – Krasnay Danil Jul 13 '20 at 03:50
1
I found the way to fix it:
Make button display: inline-flex;
or better make image display: block;

Krasnay Danil
- 101
- 1
- 9
-
https://stackoverflow.com/questions/5804256/image-inside-div-has-extra-space-below-the-image – Krasnay Danil Jul 13 '20 at 11:54