I have seen many websites that have mobile versions and i want to know how to make one!
What is so amazing about them is that they adjust according to the phone rez... And i do not have to scroll left or right just up and down.
What exactly is done to the css?
(2010-08-15, 09:55 PM)dikidera Wrote: [ -> ]What is so amazing about them is that they adjust according to the phone rez... And i do not have to scroll left or right just up and down.
What exactly is done to the css?
Nothing. That's just how CSS works...
Some of them might be sending a different version of the website based on the browser's "User Agent" string. One example of this would be
http://www.salvefelinus.co.cc where I set up a trimmed down version of the theme that doesn't have as many images, fewer features exposed, and a simplified layout. I used a plugin to choose the theme based on the browser (which, surprise surprise, was written my none other than myself) that can be found
here. In the readme towards the end are a few of the most common entries you'll probably want.
No, this is not related to mybb, but the site i am coding
(2010-08-15, 09:55 PM)dikidera Wrote: [ -> ]What exactly is done to the css?
They just use relative widths and design it so that it looks good on low resolutions.
It's like a simpler version of the website, making it easier to use on your phone.
There is also some special code going on in the case of most iPhone-enabled pages. Here's mine:
// In CSS
body
{
// Other style stuff
min-width: 300px; // 300 due to padding on my site
-webkit-text-size-adjust: none;
}
// In <head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no">