html - Media Queries Not Working -
i have following basic media query template @ bottom of style sheet so
@media (max-width: 1599px) { body { background: #000; color: #fff; font-size: 10pt; } } @media (max-width: 1069px) { body { background: #000; color: #fff; font-size: 10pt; } } @media (max-width: 999px) { body { background: #000; color: #fff; font-size: 10pt; } @media (max-width: 767px) { body { background: #000; color: #fff; font-size: 10pt; } } @media (max-width: 643px) { body { background: #000; color: #fff; font-size: 10pt; } } /* mobile devices */ @media (max-width: 359px) { body { background: #000; color: #fff; font-size: 10pt; } } however when viewed on iphone 5 on ios7, layout not changing, why? need in header etc?
thanks guys!
use this. it's better specifiy stylesheet for. i.e. screen, print, etc. can through pixel density if want in here.
body { background: #111; color: #eee; font-size: 12px; } @media screen , (max-width : 1599px) { html body { background: #000; color: #fff; font-size: 10px; } }
Comments
Post a Comment