Set different viewport width for different devices with client code? - html

I'm making a responsive site with three states (full, 480px and 320px).
Scaling to device-width look good on smartphones and devices with screen smaller than 700px, which is where the first responsive mode kicks in.
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
However, on the iPad i want the width to be 1200px so the page initially shows zoomed out in it's "full glory".
Is there any way to make this by client side code? I know i could fetch user agent on server side but since i am not making the back end code, i'd prefer a html/js solution.
Of course, a responsive state for iPad's would be ideal, but there's not time or money for that and the desktop site works good enough.

Don't know if it will be the solution for anyone else coming here, but what solved this to me was setting min-width to each responsive states <body>.. made the site load decent enough on the ipad..

Related

Responsive - All elements are way too small on mobile devices

I am working on a website right know, but I have a weird issue with the view on mobile devices.
When I resize the window on a desktop browser the elements and fonts are changing with the viewport how they should.
When I open the website on a mobile device all fonts and elements (e.g. the burger menu) are way to small. It looks like it is a scaling issue or something similar.
I have the meta viewport tag in the head so that is not the issue.
I couldn't find any similar questions here or on any other forum. I hope somebody can help.
I have attached some screenshots, but if necessary I can provide the URL.
Thank you in advance.
Full Screen Window
Resized Window
Responsive example 1
Resposive example 2
Make sure to include responsive meta tag to insure that your browser gets the right width of your device instead of zooming out the page
<meta name="viewport" content="width=device-width, initial-scale=1">
This means that the browser will (probably) render the width of the
page at the width of its own screen. So if that screen is 320px wide,
the browser window will be 320px wide, rather than way zoomed out and
showing 960px (or whatever that device does by default, in lieu of a
responsive meta tag).
Further reading Here

Viewport behavior with Ipad mini 4 (Bootstrap 3)

I am developing website to responsive for mobile and tables devices. i was using Chrome Console to debug and re-size screen to make responsive design.What i have done. my design working on the console view(Chrome Mobile devices test) but when i run to actual device on ipad mini 4 what i get response.
it's looking like scale problem. i am using mata tag. here is how i am using. <meta name="viewport" content="user-scalable=no, width=device-width, minimum-scale=1.0/> In above screenshot you can see the hole cover my container at left side and pretty much space at right side.I serached on it but i did not get enough acknowledge to clear the problem .Kindly help me to make my acknowledge to next level. Thanks...

How can I make a site automatically fit device width, without needing to zoom out?

I have a responsive website that I think looks best when it's 500px or larger, so I set the min-width to 500px.
However, I'm testing it on a 320px phone and pages have horizontal scroll, forcing me to zoom out if I want everything on the screen.
Is this a device issue? Or is there some code I can use to make my site shrink by default? (instead of having to zoom out each time I navigate to a new page)
<meta name="viewport" content="width=device-width, initial-scale=.6">
Then just adjust scale to fit what you need
I used bootstrap in my pages, it save you this hassle, try it it is very helpful in many ways.
from here.
and also has many other futures.
this is a google search for free wordpress templates.

Safari Mobile - what does site need?

What special meta tags, CSS, etc. do I need to take into consideration when making my website ready to look and function right in Safari Mobile.
I didn't take much consideration to Safari Mobile until I got an iPad. I noticed that the sites I create do not always re-size correctly, look well formatted, etc. Nothing major as I am largely a front end developer.
I searched through StackOverflow and have not found a real specific outline of Safari-Mobile considerations
I am assuming that your site is already designed in a fluid manner. One of the big things for me was this:
<meta name="viewport" content="width=device-width" />
This sets the size of the viewport so when orientation changes it resizes the viewport which allows your design to reflow to the new viewport size.

Optimize a web page for Palm Pre

I'm in the process of building a support page for my pre application.
I'm having a problem where the content on the page is very small, so the user has to manually zoom in to read it.
I've made the page so that there is nothing very wide or tall, but for some reason everything is very "zoomed out" when you first navigate there on the Pre.
I've noticed that sites like wikipedia have versions that are perfectly optimized for the Pre. How can I make my pages start out "full-sized" the way wikipedia does?
Update:
The extremely simple page that I am currently testing with.
On the above page I have tried setting the width for every element to both 310px and to 100%, the result is always the same.
I figure I can accomplish this by giving everything a static width and then making everything use a very big font size. I'm just guessing that there is a "better way", i.e. some way to let the pre browser know that it doesn't need to start zoomed out to the size of a "normal" web page (it seems that the default zoom is about 1024px wide, even though the actual rez is 320px).
I found out the proper way to do this on the webOSDev forums.
The following should be in the header:
<meta name="viewport" content="width=device-width"/>
<meta name="viewport" content="initial-scale = 1.0"/>
This has the advantage that when the user turns the device into landscape mode, everything scales appropriately, without any styling gymnastics.
Posting a URL of a problem page would be a big help here.
In general, to show nicely on smartphones, the design of the page has to be "fluid" (taking 100% of the width in percent - not specified in pixels) to use the most space in differing screen resolutions. The minimal width supported by the design should be about 300 pixels, to fit without zooming on 320x480 screens.