+ 1

What do you prefer using in Css pixels or percentages

4th Sep 2018, 9:00 PM
Charlie Da stiles
Charlie Da stiles - avatar
4 Réponses
+ 2
Charlie Da stiles, Depends.. With boxOne inside boxTwo I use % for boxOne. mostly for a single box I use pixels. Cause most of the times it is more precise. /* This should be a feed channel post instead of Q&A. */
4th Sep 2018, 9:49 PM
🌴Vincent Berger🌴
🌴Vincent Berger🌴 - avatar
+ 2
I want to agree with Vincent ... It's better to phrase questions more like, "When should I use pixels and when should I use percentages?" so it doesn't sounds like you're hosting a poll. Polls should be hosted in your personal feed, since popular opinion shouldn't sway your learning, but asking questions in earnest to clarify concepts and industry best practices can help your learning tremendously.
5th Sep 2018, 12:20 AM
Janning⭐
Janning⭐ - avatar
+ 2
Try use rm intead of px
5th Sep 2018, 12:22 AM
Calviղ
Calviղ - avatar
+ 1
They are non comparable, pixels are a fixed measurement and should be used when you want the size of something to be absolute. Percents are relative and should be used when you want something to be responsive. You should be comfortable using either when the situation calls for it along with em, rem and other units. https://www.w3schools.com/cssref/css_units.asp
4th Sep 2018, 9:45 PM
JME