I am trying to make a sample hybrid mobile app using Phonegap(cordova) and IBM Worklight. I've added the iPad and iPhone as target devices.
The web content inside the app is going to be responsive one, using CSS @media queries.
The issue I am facing is that when I launch the application on iPad/iPhone, it does not recognize media queries I've written. I tried switching the CSS using device orientation approach as well as max-width approach. Still no success.
The code used in device width approach was
/* Portrait */
@media screen and (max-width: 768px) {
/* Portrait styles since iPad in portrait has device width 768px */
/* Landscape */
@media screen and (max-width: 1024px) {
/* Landscape styles since iPad in landscape has device width 1024px */
}
and for orientation I tried
/* Portrait */
@media screen and (orientation:portrait) {
/* Portrait styles */
/* Landscape */
@media screen and (orientation:landscape) {
/* Landscape styles */
}
Can anyone suggest how to make responsive webapp in IBM Worklight, phonegap