blog.kyri0s.org


Stuff longer than 140 characters I find important to save in the internets.

CSS for iPhone/iPad/iPhone 4

Here is HTML you can use to have specific css for different devices.. took me some time to figure it out. So I wanted to share it.

Comments and improvements appreciated.

<link href="style.css" rel="stylesheet" media="screen" type="text/css" />
<link href="iPhone.css" rel="stylesheet" type="text/css" media="only screen and (max-device-width: 480px) and (-webkit-max-device-pixel-ratio: 1)"/>
<link href="iPhone4.css" rel="stylesheet" type="text/css" media="only screen and (-webkit-min-device-pixel-ratio: 2)"/>
<link href="iPad.css" rel="stylesheet" type="text/css" media="only screen and (min-device-width: 481px) and (max-device-width: 1024px)"/>
<link href="computer.css" rel="stylesheet" type="text/css" media="only screen and (min-width: 481px) and (min-device-width: 1025px)"/>

Comments
blog comments powered by Disqus