0
votes

I'm currently trying to build a website that includes a small pixel art image sized up to be larger, and per the internet's recommendation, I'm using rem to make sure everything resizes nicely.

However, I'm run into an issue when sizing the image. When I try to resize it, it treats 1 rem as equal to 1 px. So the following code will display as a 16px by 12px image:

<img src="image.png" width="16rem" height="12rem">

What's going on? According to everything I've read, it should display as a 256px by 192px image. Both my fonts and divs are sizing exactly like I expect, so I don't know why my images are acting up.

Thanks!