3

I'm not sure why my media query is working for sizes larger than specified. For example, an image with class portrait is showing up on my laptop as 250px rather than the 400px expected.

My media query is structured as follows and is at the end of my CSS.

@media screen and (max-width: 767px) {
.portrait {
    height: 250px;
  }
}

Full code: Codeply

nCardot
  • 5,992
  • 6
  • 47
  • 83

1 Answers1

4

You have an extra closing brace in your .about-text style in the media query.

.about-text {
  font-size: 15px;
  padding: 1.4em;
  /* Removes margin added in main CSS */
  margin-bottom: 0;
  } <--
}

Simply remove that and it will work as expected.

Joseph Webber
  • 2,010
  • 1
  • 19
  • 38