@bulumkopapuSubmitted over 3 years ago
I struggled a bit to make my footer background image respond to different screen sizes.
Please review my code and let me know if you have a better way to do it.
Thanks
I struggled a bit to make my footer background image respond to different screen sizes.
Please review my code and let me know if you have a better way to do it.
Thanks
Hello,
For this very example, you could create a div that would contain the footer and inside that container, you can fit an image with the following CSS to make that image reactive =>
img { width: 100%; height: inherit; object-fit: cover; }
Keep this block of code somewhere, you will use it a lot.
PS: the inherit is only if you do a position: absolute; otherwise you can do 100%.
It was an interesting challenge.
I think accessibility is a good habit to have right from the beginning. but it's just my opinion.