Something you didn't know about CSS padding
Using %
units in CSS padding matches the width of the container, even if you use padding-top/padding-bottom:
.container { width: 320px; }
.child { padding-bottom: 50%; } /* 160px */
Written by Ismael González
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#