@media (max-width: 500px) { /* The following CSS will apply ONLY to smartphones or small screens */ .error-desktop { display: none; } .error-mobile { display: initial; } div#home-grid { display: grid; grid-template-columns: 1fr !important; } } @media (max-width: 720px) { /* The following CSS will apply ONLY to medium screens (less than 720p) */ #home-grid { display: grid; grid-template-columns: 1fr 1fr !important; } } @media (min-width: 500px) { /* The following CSS will NEVER apply to smartphones or small screens */ .error-desktop { display: initial; } .error-mobile { display: none; } }