How to measure distance?

Could someone please tell me which measure unit, px, %, em or rem, I should use to make sure web pages scale correctly when viewed in different sized viewports.

Many thanks

Tony Holland

I assume you mean for the width/height declarations in which case you want %. You can do some nice tricks with vh/hw as well. e.g.:

.copyfit{ font-size: 15vw; text-align: center; font-family: "PF Handbook Pro"; text-shadow: 0 2px 0 #fff;}

hope that helps

Thanks dresden-phoenix. I’ll give that a go.

Best wishes

Tony Holland

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.