Mobile phone compatibility on site

How to make the site compatible with a desktop browser, as well as with a mobile browser?

+3
source share
2 answers

I assume that you mean compatibility. and if I knew a little more about what you are trying to achieve, I might be able to help a little.

Mainly because of the wide range of mobile devices (most of which have different browser capabilities, screen resolutions, sizes, etc.), you will never get a website for full compatibility with all mobile devices. There will always be problems with some devices.

(, iphones, nokias, blackberrys, ect) - PHP WURFL, .

PHP WURFL, , , .

+3

CSS . , HTML-:

<head>
<meta name="viewport" content="width=320" />
<link rel="stylesheet" href="mobile.css" type="text/css" media="only screen and (max-device-width: 480px)"/>
<link rel="stylesheet" href="desktop.css" type="text/css" media="screen and (min-device-width: 481px)"/>
<link rel="stylesheet" href="mobile.css" type="text/css" media="handheld"/>
<!--[if IE]>
<link rel="stylesheet" href="desktop.css" media="screen" type="text/css" />
<![endif]-->
</head>

, , HTML , .

iPhone Android. , "media =" handheld "" ref CSS ; iPhone .

+4

Source: https://habr.com/ru/post/1764656/


All Articles