Site not responsive on actual device

Started by benm, June 26, 2013, 06:23:47 PM

Previous topic - Next topic

benm

I made the site hxxp:westelszakenkantoor.be/voorlopig/ [nonactive] responsive (if I make my browser width smaller it will adjust), but when I open it on an iPhone/iPad/Android it won't adjust.

I have no idea why.

In the head of the HTML code I included
<meta name="viewport" content="initial-scale=1, width=device-width">


In the CSS file there is code like:
@media screen and (max-width:480px) {
* {
   margin: 0px;
   padding: 0px;
}


Any other tips are always welcome. I'm a beginner :D

TheListener


benm

Is it not allowed to ask questions here?

TheListener

SMF is a support forum for forum admins of smf forums.


MrPhil

Lots of people have asked questions on this board that do not appear to be directly related to SMF (i.e., general programming/web questions). If it is the policy to restrict it to SMF only, that should be clearly stated (perhaps as part of the title?).

ziycon

#5
You can use media queries to fix it, there are different widths for ipad and iphones also different again when there in landscape or portrait, for example:

<link rel="stylesheet" media="only screen and (min-width: 985px)" href="{file}" />
<link rel="stylesheet" media="only screen and (max-width: 768px)" href="{file}" />
<link rel="stylesheet" media="only screen and (max-width: 480px)" href="{file}" />
<link rel="stylesheet" media="only screen and (max-width: 320px)" href="{file}" />

HRM

SOlved yet? If you remove ", width=device-width" it wil also work.
To install something for the cat's 'cut' is never nice..... (old dutch saying) :D

Advertisement: