In a page I have to show a list of items with icons. These icons vary in size as you can see in the picture (first one is larger for example. To have the same icon size everywhere in css I put the width to 32px. However for the smaller icons (for instance the temperature one in the light blue background) space is added to the left and right of the icon. I wish that the space is added only to the right, so the icon aligns left. This space is not padding (otherwise it would be shown in green).
Is there anyway to tell the icons that when they enlarge space is added only to the right?
Not sure but you can try making them all text-align: left
and width: 100%
and add padding and margin equals zero just in case, also check if the icon in put inside a div maybe or something.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.