@thisisharsh7
Posted
Hey DlnosMpo, Well done! your solution looks perfect but there are some improvement which could be made
-
For aligning the whole content to the center you can replace
.container{ width: 600px; height: 450px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, 50%);}
withbody{ min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; }
and you can see content is well aligned to center of the page. -
You can use
<picture>
tag when you want to show different images at different screen sizes and this will not require settingdisplay: hidden or display: block
property to the images.
hope this helps...
Marked as helpful
@DinosMpo
Posted
@thisisharsh7 thank you my friend i will learn about the flex and the picture tag