i tried this by using Om's solution in a diff. way it worked for me, hope it helps someone
@media only screen and (max-device-width:1024px) and (orientation: portrait) {
/*style*/
}
@media only screen and (max-device-width: 1024px) and (orientation: landscape) {
/*style*/
}