The sites I'm developing are presented with some problems. I believe it is because of my inexperience in mobile - responsive pages.
I make my sites on Mobile First . And to test the site I use Chrome Portable Simulator on Inspect Element.
To make CSS styles I use a program called CodeKit . As I usually do my styles in LESS , this program preprocesses the code. And it has some options for that style to work across multiple browsers.
So, for example, if I type in LESS:
transform: scale(0);
In the compilation it will return:
transform: scale(0)
-webkit-trasnform: scale(0)
-moz-transform: scale(0)
At last, you understood. It already converts the code to work in other browsers that does not support such CSS property.
That's what happens:
I put a h1
on the site to stay on two lines. The title has 4 words, so I'd have two in the first and two in the second line, since I've set width:70%
on a 320px;
screen, that is, an iPhone 4 .
Then the simulator is right. But when I open the iPhone it sits on three lines. Two on top, one in the middle and one underneath.
And this happens with padding
too. It has element that gives padding:10px;
. In the simulator it works, but the iPhone does not work padding
in any of the songs. It seems that there is no room for that element to give padding
.
I do not 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 do these problems happen?
2 - Is it normal?
3 - Do I have to adapt? Font size, size of elements, spaces?