You cannot sniff the OS or browsers using CSS, but you can use @media queries to adjust different screen sizes, for example:
@media screen and (max-width: 1000px) { ... }
Above - for small screens for desktops and laptops.
@media screen and (max-width: 700px) { ... }
Above for iPad and VERY small screens for desktops / laptops.
@media screen and (max-device-width: 480px) { ... }
Above for iPhone 3GS and mobile devices in general.
However, the new iPhone 4 with the stylish Retina show Steve Jobs means it has a 2-1 pixel ratio, which means that 1 pixel actually appears in the browser as 2x2 pixels, which makes it resolution (960x640 is means that this will lead to the planning of the iPad, and not to the layout of the mobile device), so this requires another multimedia request (so far only webkit is supported):
@media screen and (-webkit-min-device-pixel-ratio: 2) { ... }
To target different browsers, you need to use the HTML if statements:
Then just bind the CSS stylesheet to these conventions
source share