0

I have this piece of code. I'm beginner :/

https://ibb.co/ccrFFG Id like to add some responsibility by @media only screen and (max-width: 320px) {} but it doesnt works with IDs. How would you change the code pls? :)

Thanks

2 Answers2

0

From your code, I don't know exactly what you are trying to achieve but I will advise you to use the code below as a guide.

  @media screen and (max-width: 320px) {
    #yourID {
        width: 260px !important;
    }
 }
dealwap
  • 621
  • 2
  • 14
  • 33
0

css media-querys only work if you use the viewport meta-tag, make sure that you use it on your site.

<meta name="viewport" content="width=device-width, initial-scale=1.0">

You can ready more about it here: https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag

JiiB
  • 1,432
  • 1
  • 12
  • 26