: 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
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
More posts by @Sarah814
2 Comments
Sorted by latest first Latest Oldest Best
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
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.