Different browsers on different phones have different screen resolution.
Is there a best practice in the community to set the width to a standard size, so that it works on most moderns phones and browsers?
Different browsers on different phones have different screen resolution.
Is there a best practice in the community to set the width to a standard size, so that it works on most moderns phones and browsers?
IMHO the best practise is to get along without too many assumptions about width and resolution of the clients device.
Mostly those devices have browsers geared towards displaying/flowing/reducing webpages. If at all possible, let the browser do the work.
There s no easy way to ensure pixel-perfect accuracy across mobile browsers (actually, there s no easy way to do that with any browser). There are, however, some methods to help with that kind of work. For example, mobile Safari for the iPhone supports a viewport meta tag that allows you to specify attributes like width. Here are some examples of usage:
<meta name="viewport" content="width = 750px" />
<meta name="viewport" content="initial-scale=2.5, user-scalable=no" />
Apple has some information here, and you ll find a lot more information across the web.
G day,
I know you re question is to decide on making a selection of the optimum screen size to work on all phones but that approach soon wears thin with users.
A large web site I m associated with takes the UserAgent string and normalises it to a common denominator, e.g. over 300 different UA strings in use in the UK for a particular Sony Ericsson phone type so they all get converted to the same string, and then does a lookup into a table to determine screen real estate.
The coders also have access to the current connection speed which is deduced by a geolocation application based on connection type, routing type, etc. at the time of the request. You don t want to be sending rich, high-def media to someone with a slow connection.
This is then used to
HTH
cheers,
You could always use "ems" instead of pixels they should scale properly.
This is still a touchy subject since many mobile browsers basically interpret what you have depending on how the devs wanted to make it interpret.
I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....
I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.
selectBox.selectCSS { background: url(/Images/replacementSelectBackground.png) top left no-repeat height:auto; } I have an issue in Safari only where the image is not rendering on top ...
How do you target specifically safari in css with styles?
Ive used the following css code to align my form elements: form { position:relative; } form input { position:absolute; left:11em; } However, the textarea element is not aligned correctly with the ...
So I ve got a menu with a hover/selected state and it loads fine in IE6/IE7. However when I scroll down the page and put the element outside of the viewport and then back in I get a broken image! I ...
I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...
I have defined my page footer in the css file as: #footer { position: absolute; height: 50px; text-align: center; background: #66CCCC; bottom: 0px; left: 0px; width: 100%; height: ...