Learn Responsive Design: 1. Sizing Elements Broken?


#1

In style.css, set the background-size property in #banner to cover.

Here’s my code.

#banner {
  height: 46rem;
  background-image: url('camel-background.png');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

Result:
Did you set the background image to cover its entire container div?

Do I need help or is it a glitch?


#2

It just worked? Wow it happened randomly!