@elaineleung
Posted
Hi Bernardo, great work in making this responsive, and I think you did well on the whole! Two quick comments for you:
-
You can add a bit of margin around the component so that when it is resized in smaller screen sizes, there's some spacing around it and its sides won't be touching the browser.
-
About
picture
, since you only have one image here and not a desktop and mobile version of the image, you don't really need to usepicture
. Thepicture
element is meant to be used as a way to handle changing different versions of the same image, whether size or format. Since there's only one version here, you can simply use adiv
if you need to make it into a container for the image. Read more aboutpicture
here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture
That's all, great work once again, and yes, you're getting better at this, keep going! 😊
Marked as helpful
@BernardoHollmann
Posted
@elaineleung Hi Elaine! Thanks for your comment! Yes, I always forget to add margin/padding in an element. Thanks for pointing it out and I will try to remember implementing it in the future. I read the article you sent me and now I know that <picture> is more offten used when resizing the window screen. I am still trying to use different approaches to some problems that I am having (specially with positioning and sizing pictures inside a container) and, in this case, I tried the <picture> tag. It worked, but, as you said, it is probably better to use a <div> to make it simpler. Thanks so much for your comments! I really need to improve and these tips are exactly what I need. By the way, this helps me to keep on going! =)