Heres my code

<link rel="stylesheet" media="screen and (max-width: 568px)" href="mobcss.css" />

(target media is iphone5)

It is possible to add “webkit-min-device-pixel-ration:2 or min-resolution:2dppx” in my link element as in linecode?
and how it is?

Recommended Answers

All 2 Replies

A normal <link rel="styleshet" type="text/css" href="your_mobile.css"/>

The responsive part of your css goes in your css file.

Don't add your responsive rules as atributes to your html link tag, it will only cause trouble with older browsers and unexpected errors
Hope this helps.

Why you are using the way it need not to.

If you want just for iphone then have a diffrent css style for it and make it visible when the website run on device. Better idea is to used @media css in a responsive way as suggested by dany12.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.