A little help with the image in this challenge
I started this Frontend Mentor challenge and I don't know how can I style the illustration on the left side in design file. I can do position relative but then when we go to small devices, there a totally different image file that we have to use. How do I switch images when changing screen size.
4 Replies
look into picture element 🙂
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
As Mannix said, you want to look into the picture element. But you don't need
position: absolute
here, just a simple transform: traslateX()
with a negative number to push the image to the left a bit:
https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/translateXThank you so much for the suggestions. These helped a lot