There is an experience of creating html using css , but I do the adaptive design for the first time. The problem is this, when opened on the phone, it corresponds to the design, but everything is very small.

It looks like on the computer:

img1

It should look like this on the phone:

img2

And it actually looks like this:

img3

Archive with html and css: http://goo.gl/6YcdC

  • You in the adaptive block put down both the width and the indents, but as if you forgot about the font size ... Maybe you should also print it out in the em dimension? add font-size feature - binliz

2 answers 2

This is due to differences in the resolution of the desktop monitor and handheld devices.

As correctly noted by Comrade. @Crasher , you need to operate with the viewport meta-parameter. Only the prohibition of scaling has nothing to do with it. It was such sv-in target-densitydpi , but it was cut out. You need to specify width=device-width and experiment with initial-scale=...

 <meta name="viewport" content="width=device-width, initial-scale=1" /> 

It once helped me.

  • Thank you for what you need! Just added a user-scalable = no - driveduck
  • one
    <meta name = "viewport" content = "width = device-width, user-scalable = no, initial-scale = 1" /> - driveduck
  • If you identify problems with the size of the text on the phones, you need to specify the max-height: 999999px for the problematic elements (the value is not important, the presence of the Holy Island is important). I generally prescribe this hack at the very beginning of the css file: * { max-height: 999999px; } * { max-height: 999999px; } - Bars
  • What are you plus something ?! device-width is also not supported. The last time I heard about it, it was deprecated - Bars
 <meta name="viewport" id="meta-viewport" content="user-scalable=no"/> 

or

 <meta name="viewport" id="meta-viewport" content="width=480px,user-scalable=no"/>