Streaming live at 10am (PST)

Controlling margin, padding & Font

Stumbled upon a real helper today.

Feel kinda stupid actually as I knew using a percentage for the body, I could then use em on font for better control.

Anyway, If you guys have the proper or better way, let me know…

So I was having a hard time scaling my font, paddin & margin for some elements.

So I assigned the body as percentages.

Inside my elements I assigned font, padding, margins with em while assigning the element itself as percentage.

Now when I switch to tablet, phone, etc. I simply scale the percentage. Voila…

The em’s inherit the percentage ans I can scale all at once.

I haven’t had sleep in a day so I could be seeing things wrong.

Thoughts on this approach are appreciated.


I don’t have thoughts on your approach, but just want to say you can also use VW and VH units (just type them). They represent %age of the viewport, they’re extremely handy to use.