I want to check the orientation using css for ipad. This is the css file I use
@media only screen and (device-width:768px) and(orientation:portrait) {
body { background: green; }
}
@media only screen and (device-width:768px) and(orientation:landscape) {
body { background: red; }
}
I'm not sure if this will work or not. I tried testing in the iphone emulator, changing the width of the device to 320 pixels. But that did not work. Do I need to change anything in this css file? This is how I call css on the main page
<link rel="stylesheet" type="text/css" href="iPad.css" />"
source
share