Hobbies And Interests

How to Convert Pixels & Percentages

A HTML document's layout can be set with pixels, percentages or both. Pixels are pieces of information describing the color and location of each piece of information making up the page. Pixel sizes set an image size that remains the same, no matter how large the computer monitor it is viewed with. Percentages adjust depending on a monitor's size. If a webpage is built to occupy 80 percent of the monitor's screen, the image will occupy 80 percent of any screen, regardless of its size. Generally, a combination of pixels and percentages is used when setting up an HTML page.

Instructions

    • 1

      Turn the pixel into a fraction to convert it to a percentage. Think of a pixel as a fraction over a denominator of 16. If you have 12 pixels, think of this as 12/16 pixels.

    • 2

      Multiply the numerator of the fraction by 100, and divide by 16 to convert pixels to fractions. If you have 12/16 pixels, 12 x 100 is 1200/16 = 75 percent.

    • 3

      Turn the percentage into a fraction to convert it to pixels. Fifty percent is really 50/100, for example.

    • 4

      Multiply the numerator of the percent by 16 and divide by 100 to turn the percentage into pixels. If you have 50/100 and want to turn this into pixels, 50 x 16 = 800/100 = 8 pixels.


https://www.htfbw.com © Hobbies And Interests