Joined March 2014
·

Nathan Uphoff

Netherlands
·
·

This works great indeed. Additionally you can give the img-element a max-height or -width. This may come in handy when you display a gallery yet some images are extraordinary wide or tall. This way you can put a limit on the aspect ratio.

Posted to One liner CSS trick for spacing items over 1 year ago

While you’re at it, when a value is zero there’s no need to add the unit (px in this case)

Achievements
1 Karma
0 Total ProTip Views