[Solved] CSS rules not overridden with another rules after them


You are using completely wrong syntax of writing css @media rule. Follow this w3schools link, the correct syntax should be:

@media not|only mediatype and (media feature and|or|not mediafeature) {
    CSS-Code;
}

The correct code will be:

#subheader h1 {
  font-size: 3vw;
}

@media screen and (max-width: 39.9375em) {
  #subheader h1 {
    font-size: 3vw;
  }
}

@media screen and (min-width: 40em) {
  #subheader h1 {
    font-size: 3vw;
  }
}

/* Large and up */
@media screen and (min-width: 64em) {
  #subheader h1 {
    font-size: 3vw;
  }
}

0

solved CSS rules not overridden with another rules after them