By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more


Reference entry on Pixels. Describes what a pixel is, and how its used for measurements.

Edited: 2015-12-07 15:43

A pixel is a single point on a display device, often used for measurements, to place objects on the screen.

In the past most websites would be somewhat pixel-based, where's more sites are using a combination of EM and Percentages today. It can therefor be difficult to know the exact position of a given object on the screen. See also: Units of Measurement.

Using a pixel-based layout has become much less harmful, because recent browsers got build-in zoom features. But for desktop application, you still somewhat face the same problems with usability. Therefor you still have to carefully consider the advantages and disadvantage of using a given length unit in whatever situation.


For website layouts, a min-width and a max-width defined with pixels, combined with the use of CSS Media Queries, can completely eliminate the problems with using pixels for layout.

Another option is to use Em's for everything but the minimum and maximum widths, which ought still to be declared using pixels. This would result in a very flexible layout, which will fit most screen resolutions. Combine this with media queries, and you will have a nice all-in-one solution, which is very easy to maintain.

Using media queries also eliminates the need to create a separate mobile version of your website.