0

My CSS styles which responsive for small screens don;t appear when i inspect the web page and make it a small screen. It just appear for milli seconds and then vanished.

@media(max-width:700px){
    .text-box h1{
        font-size:20px;
    }  

i'm just watching a youtube video and trying to make this web side. In the video it does appear in small screens when he inspect the web page as a side menu.

1 Answers1

-1

From the solution that answers the question about the difference between only screen and screen, these are the points:

@media(max-width:700px) { ... }

Styles are applied for a window with a max width of 700px.

@media screen and (max-width: 700px) { ... }

Styles are applied for a window and a screen with a max width of 700px.

As the inspector can vary the screen size, the difference can't been seen, whereas if you resize your window, the changes are visible.

Geeky Quentin
  • 2,469
  • 2
  • 7
  • 28