Pixel/Percentage Rounding Test Page

Example One

container width: px

Box 1
Container

box 1 width as set in CSS:

box 1 width in pixels manually calculated using percentage:
( / 100) x

box 1 width in pixels manually calculated using percentage truncated to 2 decimal places:
( / 100) x

box 1 width percentage as calculated by the browser:

box 1 width in pixels as calculated by the browser: px

Example Two

container width: px

Box 2
Container

box 2 width as set in CSS:

box 2 width in pixels manually calculated using percentage:
( / 100) x

box 2 width in pixels manually calculated using percentage truncated to 2 decimal places:
( / 100) x

box 2 width percentage as calculated by the browser:

box 2 width in pixels as calculated by the browser: px

Example Three

container width: px

Box 3
Box 4
Box 5
Container

box 3 width as set in CSS: 620.4px
box 4 width as set in CSS: 620.5px
box 5 width as set in CSS: 620.6px

box 3 width in pixels as calculated by browser: px
box 4 width in pixels as calculated by browser: px
box 5 width in pixels as calculated by browser: px

Example Four

Box 6
Container

box 6 width as set in CSS:

box 6 width percentage as calculated by the browser:

number of decimal places: