Exploring orientation testing using CSS for iPad. Below is the code snippet from the CSS file:
@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 am uncertain of its functionality and attempted to test it on an iPhone emulator by adjusting the device width to 320px, but without success. Is there a modification needed in the CSS file? The CSS call in the main page is as follows:
<link rel="stylesheet" type="text/css" href="iPad.css" />