Hello everyone, I want to write a website that stays the same in normal browsers but displays differently for the iPhone. The same way gmail does, like it is loading a different html file. Does any one know how to do that?
You can use specific CSS for the iPhone, by using the media specification.
You can have a set of CSS rules that will only apply to the iPhone smaller screen:
Code:
@media only screen and (max-device-width: 480px) {
.navigation {
display: none;
}
}
Alternatively you can use Javascript to check for the specific browser by using browser detection, an then simply redirect to a site that's nice and small for the iphone screen.
Basically you design your site with a 480px screen in mind.
----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
Behind the Web, Tips and Tricks for Web Development.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.