How to use @media correctly in css
问题 How to use @media in css for certain resolution? So I want to make my sidebar changes depend on the user resolution, so I use @media. This is the example code: @media (max-width: 1920px) and (min-width: 1080px){ /*for 1920 x 1080*/ .logo1{ margin-top: 70%; } .socmed a:nth-child(1), .socmed a:nth-child(2){ margin-top: 100%; } } @media (max-width: 1680px) and (min-width: 1050px){ /*for 1680 x 1050*/ .logo1{ margin-top: 70%; } .socmed a:nth-child(1), .socmed a:nth-child(2){ margin-top: 90%; } }