View Single Post
Old 01-08-2020, 06:23 PM   #4
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,369
Karma: 20212733
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
The only time I use px measurements are when I'm trying to limit the maximum size of an object. For example, an older book might have small images. I want the image to fill the screen as much as possible without getting over-stretched and blurry. In that case I would set the image width to be 85% of the screen, with a maximum width of the original image width.

Code:
ExampleImage.jpg = 500 x 800 pixels (w x h)

div {margin:2em auto; width:85%}
img {width:100%, max-width:500px}

<div><img alt="" src="../Images/ExampleImage.jpg" /></div>
Other than that, I would want to use measurements that keep everything relative to the user selected font/margin sizes - like 'em'.
Turtle91 is offline   Reply With Quote