CSS CSS Basics Understanding Values and Units Pixel Units

Aaron Coursolle
Aaron Coursolle
18,013 Points

So pixels are absolute, and yet they are not?

So from what I understand from the lesson, pixels do not scale based on screen size, but they scale based on scale density. If I create a background image in an editor, how will I know in the css how much room to give it?

3 Answers

Aaron Coursolle
Aaron Coursolle
18,013 Points

I think so, but I've always assumed that pixels were the most absolute measurement available.

Aaron Coursolle
Aaron Coursolle
18,013 Points

Ignore the option to create different media queries for different screen resolutions. What I'm seeing in the link, is to create the image at 2X by 2Y. But in the CSS, declare everything at a 1:1 ratio. I'm only rephrasing the advice presented in the link in a way I can easily remember.

Will this allow a background image to be seen, in its entirety, regardless of what monitor a person is using; even if the user has to horizontally scroll it? Or will some monitors cut the image in half?

Do you mean what width and height you give the image in css for a background image?