Q:

css only for desktop or laptops but not for ipad browsers

How can I apply the css only for desktops and laptops browser excluding ipad and mobile browsers?
@media only screen and (min-width: 742px) and (max-width: 769px){
  #element{
    display: none;
  }
}

A:

How can you guarantee a user isn't going to view your site/webapp on a desktop device that falls into the viewport width you have stated? You can't.
If really need to be that specific, device specific as apposed to using viewport width, you can sniff the browser I guess.
Here is a quick jquery demo here using:
navigator.userAgent
http://jsfiddle.net/y3ds0xpv/ - note: you'll need to view on a mobile device to see the difference between desktop and mobile.
Ultimately, I'd recommend using this if you need to use this method:
http://detector.dmolsen.com/

A:

Finally, I got working media query only for desktops or laptops browser:
@media only screen and (min-width: 742px) and (max-width: 769px), 
not all and (min-width: 742px) and (max-width: 769px) (orientation: portrait){
   #element{
     display: none;
  }
}

Glad to say, it is working nice.

