Jump to content

@media vs media=


davej

Recommended Posts

I am thinking these are identical...

<style>@media screen and (min-width:501px){    body { font-size: 10pt }  }@media screen and (max-width:500px){    body { font-size: 8px }  }</style>

<style media="screen and (min-width:501px)">    body { font-size: 10pt }</style><style media="screen and (max-width:500px)">    body { font-size: 8px }</style>

Although I can't actually find that stated in the specs...http://www.w3.org/TR/css3-mediaqueries/

Link to comment
Share on other sites

Well, the HTML5 spec defines the media attribute as containing a valid media query, and that's the spec all modern browsers actually implement, so yeah - those are indeed equivalent.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...