0

I have a website, what has 1000px width on desktop computers. I want to show it 100% width on every mobile device.

I was tried this code, but failed on Android 2.2.x :

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

I use this doctype code:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

Edited: I tried this code too, this is irrelevant parameter.

<!DOCTYPE html>

I want to see full width of my page on every mobile device in every viewport (landscape and portrait too).

What will be the solution?

netdjw
  • 5,419
  • 21
  • 88
  • 162
  • Have you used media-queries in your CSS files? – Nitesh Dec 09 '13 at 10:50
  • No, only this codes used. – netdjw Dec 09 '13 at 11:26
  • You need to also use media-queries along with this code on your CSS. - @netdjw – Nitesh Dec 09 '13 at 11:29
  • It is necessary to write different CSS code? There is no way use only HTML meta tags? – netdjw Dec 09 '13 at 11:34
  • No. Media queries adds responsiveness to your website and can display elements accordingly to your size with the provided meta code. - @netdjw – Nitesh Dec 09 '13 at 11:38
  • The base of the problem is this: if I see the page in landscape that is absolutely correct. But if I change to portrait view the browser don't resize to 100% the page. How can I define to portrait view default scale? Or how can I find out what is the user viewport? I want to define default scale on landscape AND on portrait too. – netdjw Dec 09 '13 at 11:57
  • Have you tried using ` ` as your doctype? - @netdjw – Nitesh Dec 09 '13 at 12:04
  • @Nathan Lee: yep, that is irrelevant parameter. – netdjw Dec 09 '13 at 13:25

1 Answers1

0

Devices lower than Android 2.3 do not support the viewport-meta-tag.

For more info: https://stackoverflow.com/a/12270403/995320

Community
  • 1
  • 1
bbuecherl
  • 1,609
  • 12
  • 20