Responsive Site appeare on iphone very small - responsive-design

I am working on a new website and trying to get it responsive.
But because of some reason the website appears very small if I test it with the browser inspect on a size of an iPhone, but if I change the window size in the browser to a custom width it acts normal.
If I test it on my own phone it also appears very small.
I appologize for the less information, but I really don't know where this problem is coming from.
Does someone have a hint for me?
This is the site: http://dev-ghp.whocando.eu/template/templates/main.html
Thank you in advance!

You need to tell the mobile device to adjust its viewport for its screen size. Add this to the top of your <head>.
<meta name=viewport content='width=device-width, initial-scale=1'>

Related

meta tag viewport content width and initial scale having issues

I am developing a webapp using angularjs. The webapp loads perfectly fine when the mobile device language is set to any except Chinese. I debugged a lot and found the issue that the web app is not loading because of the meta view port tag in the index.html. As soon as I remove the width and initial scale from meta viewport tag, the web app loads successfully in the mobile when the language is set to Chinese. navigator.language = "zh-CN" May I know the reason why this is creating problem when navigator.language is set to Chinese ? Is there any other alternate solution to make my webapp working?
Having the below meta tag in the index.html, doesn't render my app properly if language is set to Chinese
But if I remove the width and initial-scale, then the app renders properly if language is Chinese.
<meta name="viewport" content="maximum-scale=1.0, user-scalable=no, minimal-ui"/>.
I also tired a sample app, but the issue is observed there as well. Please see below my index.html where you can easily reproduce the issue in any Android phone. I tried in my S3 and also in a S4 device . Please help me on this issue. You can copy the below index.html and load it in your apache server to see the issue. The moment you remove the width and initial-scale from the DOM element, you can see the app loads perfectly.
Please help on this issue
Instead of setting initial-scale and/or user-scalable, try combining a minimum and maximum scale. For example:
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />
You don't need to use minimal-ui. Apple dropped support for this in iOS8.
It's never a good idea to set maximum-scale nor to set user-scalable="no" because it stops people from being able to zoom, which they may need to do.
It would be interesting to see what happens when you remove these and simply use the viewport:
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
I cannot see how the language would be causing this to happen, but it clearly is occurring, it sounds like a very interesting edge case.
Have you also tried other Chinese related lang settings such as "zh" or "zh-Hans"?
I also wonder if it's related to the font, and thus related to this question?

Responsive Email Template Problems on a Mobile Device

I have a responsive template that works perfectly and it is excellent in a PC whenever i re-size it at any width. But it is not responsive when i look at Gmail in my Andriod Mobile Phone. My Email Template has all the appropriate media queries and widths set to 100%.
I can't figure out a solution. It will be very helpful if someone gave a permanent solution.
If anyone want to see the file and give out a solution here it is:
https://www.dropbox.com/s/pkvdw5cg50...late.html?dl=0
Thank You in Advance
Gmail on Android does not support media query.

Website is not scalling to mobile

Ive got a problem with website which I was helping to develop.
link is here: http://orfinstudio.pl/www/
why the website is not scalling to the size of mobile?
Ive used
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
tried also other combinations..
I'm fairly new to this place but I've some experience with web design and stuffs.
I advice you to never use templates because they can be very difficult to handle.
If you are using css positioning I greatly advice you use margins to move your containers around. left, top, right, and bottom will retain their property whether it's on mobile or desktop. So
top:1000px(desktop) = top:1000px (mobile), but
margin-top:1000px(desktop) = margin-top:1000px/mobile screen size(mobile).
Use px (NOT percentages)as unit when you are directly in the body tag, mobile phones are smart, they will shrink the web page in a facinating way so you dont have to worry about multiple css for the same website(mobile queries). I advice you only use percentages in child containers, e.g a div in a div.
Make sure you understand how a slider works before you implement it into your website.
Finally the website looks as though its missing some style sheets,make sure you have the right paths/reference to each style or script files.
This is a mobile-desktop website which I created sometimes ago using pixels http://marybethandtonias.com
I had this problem once,i got solution through internet and i fixed it,Change this in your meta tag...
content="user-scalable = yes"

Setting a website to fullscreen on all mobile devices

I'm trying to find a way to set the size of the body element of a website to the size of the available screen. On a desktop browser, it's easy: width=height=100% but on a mobile device it's not so simple:
Many device default to some initial zoom-setting that tries to display pages at an optimally readable scale. For Android, I can turn this off with the following <head>-tag:
<meta name="viewport" content="width=device-width, height=device-height, target-densitydpi=high-dpi, initial-scale=1.0>
Now, setting the width of the body works as expected (under Android). The height is a whole different problem, since the browser will then set what 100% means based on the current location of the address bar. So, if your page was initially longer than visible and had been scrolled such that the address bar is off-screen, setting height to 100% has the desired effect. But as soon as the user moves the page down to expose the address bar, the height gets updated so that it is no longer possible to scroll back in the other direction.
So, for mobile devices, it seems that the only way to set the body height correctly is by setting it to a pixel size rather than 100%. But reading this article on all the different available size measures (screen.height, window.outerheight, ...) gives me the shivers about making it work across devices:
Thus my question:
Is there a reliable, best-practice way to achieve setting the size of the body element on mobile devices such that the page takes up all available screen real-estate (including pushing the address bar off-screen), but no more? For extra credit: Can this be done, such that the user can still zoom in (but not out) on the page?
Solutions either using JavaScript or CSS or both are perfectly acceptable for me, but they should work across as many devices as possible, at the least on the desktop (IE6+, Opera, Chrome, Firefox, Safari) and on mobile devices (phones, tablets, Android, iOS, Windows Mobile).
I'm not completely clear where you are heading with this, but see if any of these suggestions help.
For the meta tag, try
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
I'm not sure if target-densitydpi=high-dpi is required. Easy enough to replace if necessary though.
For the CSS
html,
body {
height: 100%;
}
And to hide the address bar, I've used this code with good results before, or here's another that I haven't used
Good luck!

If the screen width is less than 700px it should add another css stylesheet using mediaqueries... but it doesn´t

I´m using a different stylesheet for smartphones and smaller screensizes using <link rel="stylesheet" type="text/css" media="only screen and (max-width: 700px)" href="/smartphones.css" />
The thing is that in my browser it works ok (when I make the window smaller, or when I use a site that emulates some smaller devices), but it won´t work when I try to access my site using my phone.
I´ve tried with an HTC Wildfire (240x320 px) and I´ve set my smartphones.css stylesheet to get called if the screen is smaller than 700px.
I´ve deleted the cache, and I´ve even tried with a couple of other phones... it still appears the complete, normal, big sized window version of my site.
Any thoughts on what could be wrong?
The site is liganet.net
Thanks!!
It might be that your smartphone is not telling your website that it's screensize is small. It happens with smartphones sometimes. My HTC Wildfire scrolls the window and keeps it big, instead of telling the website that it should be handed a smaller version.
Maybe you should check for HTTP headers for User-Agent instead of relying on screen size for this.
hey just add this in tag
<meta name="viewport" content="width=device-width, initial-scale=1.0">
and it will work.

Resources