I am facing an issue with CSS media queries...
For my HTML page, I have separate files for desktop and iPad styles - desktop.css and ipad.css. In desktop.css, I have used @import url("ipad.css"); and added a @media not only screen and (device-width:768px) block for desktop styles.
This is how desktop.css looks like:
@import url("ipad.css");
@media not only screen and (device-width:768px)
{
//Desktop styles
}
While the iPad CSS is getting applied correctly, the desktop styles are not rendering. I am unsure about what's wrong with the "@media not only screen ..." statement.
After referring to http://www.w3.org/TR/css3-mediaqueries, I found out that using 'not' at the beginning of the media query negates the result. However, in this case, it doesn't seem to be working as expected.
Can someone please help me figure out why the desktop styles are not being rendered? Thank you!
*EDITED*
What could possibly be causing this issue?
@import url("desktop.css") screen;
@import url("ipad.css") only screen and (device-width:768px);