PX / EM / REM
Page 1 of 1
Interinactive
VIP Member



Posts: 29151

PostPosted: Wed, 28th Aug 2013 10:37    Post subject: PX / EM / REM
For those here who do a bit of front end work... what do you use for both type and margins/padding?

I've always used EM/REM for type but left padding/borders as pixel values

Any thoughts as to why going to REMs for everything would be a bad thing? Apart from shitty browsers not supporting them of course
Back to top
Werelds
Special Little Man



Posts: 15098
Location: 0100111001001100
PostPosted: Wed, 28th Aug 2013 11:55    Post subject:
Because there are plenty of cases where a relative measurement is not appropriate.
Back to top
Interinactive
VIP Member



Posts: 29151

PostPosted: Wed, 28th Aug 2013 12:02    Post subject:
⁢⁢


Last edited by Interinactive on Tue, 5th Oct 2021 03:04; edited 1 time in total
Back to top
Werelds
Special Little Man



Posts: 15098
Location: 0100111001001100
PostPosted: Wed, 28th Aug 2013 12:12    Post subject:
Define responsive Wink

If you mean responsive up to resolution X you won't find many issues, although even then it doesn't make sense to use REMs for borders for example. I can't see any point in using REMs for a border when you've designed it specifically to be 1px. The majority of design elements like that are not meant to scale.

Now try to do a fullscreen responsive site, that can handle up to 2560x1600 and look good across everything. I guarantee you that REMs are not the epic solution they may seem; for typography they're fantastic. But even for padding you're still going to want custom values depending on resolution (since font-size does not necessarily scale linearly with resolution to look good), at which point it makes absolutely no difference whether you use pixels, percentages or either of the EMs Smile
Back to top
Page 1 of 1 All times are GMT + 1 Hour
NFOHump.com Forum Index - Programmers Corner
Signature/Avatar nuking: none (can be changed in your profile)  


Display posts from previous:   

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.8 © 2001, 2002 phpBB Group