0
How to measure pixels
i have been having trouble placing contents on my pages because of not knowing how exactly the "pixel" measurement works. for example i want my content to be half a page wide how do i know that may be 250px is the right amount or how many pixels are half the width or height of my page.
6 Réponses
+ 10
You can also use percentages like 50% or something like that
+ 6
guys, you recognize that there are different display resolutions? also not everybody has their browser window maximized... plus there are browser with built-in sidebars. so every browser has a different width and height. if you really want to deal with pixels here, you'd have to calculate the correct value with the help of JavaScript. better use percentages. 😉
+ 3
Something I do all the time... open internet browser, open dev console, edit the pixel value using up and down arrows (keyboard keys) and see when the value fit my expecting and report the value in my CSS :3
+ 2
At first choose a random measurement of pixels for height and width.Then increase/decrease the pixel measurement for height if you want to increase/decrease the height...or increase/decrease the pixel measurement for width if you want to increase/decrease the width
+ 1
so it's more of a trial and error.
thank you all.
+ 1
Actually Mario is right you will have to target responsive but to keep it simple at first, do it with fixed value, then try to mix % and fixed and then try to understand responsive philosophy. Do it step by step I think.