Learn Responsive Design: 1. Sizing Elements Broken?


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;

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

Do I need help or is it a glitch?


It just worked? Wow it happened randomly!