Share via:

The Pixel Unit

Pixels are used in webdesign as units of measurements to control dimensions and placement of elements.

343 views

Edited: 2017-12-11 04:59

A pixel is a single point on a display device, used in raster graphics, such as PNG or JPEG files, and often to control the dimension and position of elements on the screen.

Pixels are also used in UI design, when placing elements precisely, though flexible units such as em, rem, vw and percentages (%) are usually preferred.

Pixels are also used when sending mouse clicks, positioning, and resizing windows in AutoIt.

In Webdesign

For website layouts, a min-width and a max-width is often defined in pixels, while Media Queries, are used to control the behavior of elements in lower screen resolution.

Many developers prefer using a relative unit, such as Ems or percentages (%), even though pixels should no longer present much of a problem, since most browsers allow to zoom in on the entire website, and you can also use media queries to adjust the layout for different window sizes.

Using media queries to control page layout in different window sizes effectively eliminates the need to create a separate mobile version of your website.

Comments