Mobile app version of vmapp.org
Login or Join
Sarah814

: Responsive or adaptive design Which is better experience in responsive design.. To create all containers with % and em units OR use pixels for main containers and % for content (adaptive)? Thanks

@Sarah814

Posted in: #ResponsiveDesign

Which is better experience in responsive design..

To create all containers with % and em units OR use pixels for main containers and % for content (adaptive)?

Thanks

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Sarah814

2 Comments

Sorted by latest first Latest Oldest Best

 

@LarsenBagley460

I don't really see a need to choose one or the other. EMs are good for most font related applications like font-size, line-height etc. I use them for stuff like border-radius, box-shadow so those elements will scale up too. Percentages are usually good for applying width, margin and padding to boxes. Things like border you can't apply a percentage width, but you can use an em width. You should really use them in tandem. The goal is to make everything scalable on your site and to not use fixed width elements, so there really isn't a need to pick a side in this instance.

As Dominic mentioned using EMs they are always affected by the parent container. If you're targeting IE9 and later then you can get away with using REM units, which are Relative EMs, so they aren't affected by the size of the parent container. For more info on REM compatibility check caniuse.com/rem

10% popularity Vote Up Vote Down


 

@Miguel516

Structuring the site using % for containers will provide maximum flexibility across devices.
You can always utilise min-width and max-width properties to add any restrictions. Often very useful in large displays.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme