Is there a way to detect if the user is using a tablet or a phone? As an example a person surfing the web using a tablet (any android tablet with version 3+ and iPad) they
If you're using media queries in theory you could use @media handheld but support is pretty much non-existent.
Simplest way of identifying high res mobile devices would be to look at the DPI of the screen and the device-pixel-ratio (via webkit/mozilla vendor specific tags currently)
@media (-webkit-max-device-pixel-ratio: 2),
(max--moz-device-pixel-ratio: 2),
(min-resolution: 300dpi) {
...
}
edit: window.devicePixelRatio to do the above in JS
There is a nice article here with lots of ideas for identifying mobile devices.
http://davidbcalhoun.com/2010/using-mobile-specific-html-css-javascript