2
The sites I am developing have presented some problems. I believe it is because of my inexperience in mobile pages - responsive.
I make my websites in Mobile First. And to test the site I use the Chrome simulator for handheld devices, in Inspect Element.
To make the CSS styles I use a program called Codekit. How I usually do my styles in LESS, this program pre-processes the code. And it has some options for that style to work in several browsers.
So, for example, if I type in the LESS:
transform: scale(0);
In the compilation will return:
transform: scale(0)
-webkit-trasnform: scale(0)
-moz-transform: scale(0)
Anyway, you got it. It already converts the code to work on other browsers that don’t have support for such a CSS property.
Hence what happens:
I put a h1
on the site to stay in two lines. The title has 4 words, so it would be two in the first and two in the second line, since I determined a width:70%
on a screen of 320px;
, namely, a iPhone 4.
Then in the simulator is right. But when I open the iPhone is in three lines. Two on top, one in the middle and one below.
And this happens to padding
also. It has element that I give a padding:10px;
. In the simulator works, but the iPhone does not work padding
in some of the corners. It seems that there is no room for that element to give padding
.
I don’t know why this happens. Some of the problems I solved using this meta-tag
:
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
And in the CSS file I put it like this:
<link media="all" type="text/css" rel="stylesheet" href="css/main.css">
.
1 - Why these problems happen ?
2 - It is normal ?
3 - Must I go adapting ? Font size, element size, spaces ?