@d-donne
Posted
Hi @xmavv. Great job on this project.
Concerning your question on max-width
Block level elements like div, section, main, footer, etc already take the full width of their parent element, so in most cases, it's not necessary to set width: 100%.
The max-width property tells the browser the maximum horizontal space the element can cover. As such you may not see it's effect if the element itself is not big enough to cover that space. It is however useful if the element, say an image has a width that can grow to be greater than that of the parent element. This will make it able to shrink, but not grow past its parent.
concerning background image
If the image's primary role is to serve as a background, then you should use the CSS background-image
property. If it's an image that adds meaning to the page, then use HTML <img src="" alt="">
tag - and always remember to add alternative text for semantic reasons.
That being said, it is sometimes difficult to manipulate certain images when used as background-image, hence the img tag is used in these situations and manipulated in the CSS.
I hope this helps.
Marked as helpful
@xmavv
Posted
@d-donne Thanks for Your time, that explains a lot!