TFC TFC - 5 months ago 31
CSS Question

Media query for screen not work

I am trying to change font size according to screen size in my materialize.css. But it isn't working. What am I doing wrong exactly?

@media screen and (min-device-width: 600) and (max-device-width: 1500) {
h1{
font-size: 2em;
}
h5{
font-size: 14px;
color: green;
}}

Answer

Simply add px to value

@media screen and (min-device-width: 600px) and  (max-device-width: 1500px) {
h1{
    font-size: 2em;
}
h5{
    font-size: 14px;
    color: green;
}}