Posted By

jefferis on 01/24/15


css header type style query media

Versions (?)

Sample Media Query in html Header

 / Published in: CSS

Unlike linked style sheets, it is necessary to enclose CSS in Headers in a "style type". This example media query is for screens under 1024 (tablets and phones) to make sure the images do not extend beyond the layout.

  1. <style type="text/css">
  2. @media only screen
  3. and (max-width : 1024px) {
  4. img {
  6. max-width: 100%;
  7. }
  8. }
  9. </style>

Report this snippet  

You need to login to post a comment.