Why doesn't the background image in this div use the padding-top i assigned it? (Layout with flexbox)


Here’s my CSS for the div:

#mission-container {
display: flex;
flex-wrap: wrap;
padding-top: 70px;
height: 700px;
background-image: url(./Imgs/img-mission-background.jpg)

Because padding influences the content of an element, not the styling.
The background-image is added by styling ergo the padding has no influence.

Please refer to the w3schools documentation on background properties to see what you can do.

1 Like