
Design comparison
Solution retrospective
I'm happy to discover about css clamp function which let me to make application responsive without using @media rule.
What challenges did you encounter, and how did you overcome them?Like I said, I was searching for a way to make app responsive without using @media rule as per challenge of the task, and I've found about css clamp() function.
What specific areas of your project would you like help with?I need help with putting image inside figure tag in my solution so that no background color of figure tag is visible. I did not find a way to overlay img fully over figure tag without going for an absolute positioning.
Community feedback
- P@huyphan2210Posted 2 months ago
Hi @neo-the-coder,
Your situation is quite unusual. The Browser DevTools show that your
img
has the samewidth
andheight
as thefigure
, yet the background color of thefigure
is still visible.After some research, this could be due to Subpixel Rendering (Anti-Aliasing). This happens when the browser smooths the edges of elements for better visual quality, sometimes causing thin, barely visible gaps between the image and its container.
A quick workaround is to apply:
img { transform: scale(1.01); }
This slightly enlarges the image, just enough to cover the background.
I know this isn't a perfect solution, but it should help for now!
1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord