What type of measure is used when building a site, such as width and height. If it's pixel, percentage, dot, centimeter?
What type of measure is used when building a site, such as width and height. If it's pixel, percentage, dot, centimeter?
It all depends on what your need is! The most common measurements are pixel, percentage, EM.
We use percentage when we want to develop an interface that will fit into other resolutions, making the element which has been added the percentage, flexible with page size.
Pixel we use when we want something that is always this size, because regardless of the size of the device, the pixel always has the same size.
Here are two articles that can help a lot in this discovery about the units!
I hope you have helped!
About site widths , they are usually set by @Medias
, but do not stick to magic numbers. I'll give you several examples from my point of view.
First, there is no official recommendation for screen sizes and BrackPoints by W3C, whether in PX, REM, EM or CM. (REM and EM measurements are based on the default font-size of the root-element, usually 16px, then 1REM = 16px, and the EM and REM-related here has more information about this: link )
Here is the official Media Queries documentation link
Mozilla also does not refer to BrackPoints as well as to Google. Follow official links to good practices.
There is also little consensus among the most famous FrameWorks such as Bootstrap , Materialize and Foundation . .. Each one determines a different width for Grid and screen widths.
Bootstrap4breakpoints
Materializebreakpoints
Foundationbreakpoints
Andtotopitoffhere'sagreatarticleonthemostpopularscreensizescurrentlyavailable,thedataisforDecember2017.Article: link
Desktop Screens
MobileScreens
TablerScreens
Source: link
OBS : Always consider your target audience and user experience before you start development!