how2html Posted November 2, 2009 Share Posted November 2, 2009 As of now, my website looks perfect on all browsers except for on cell phones. I want to know how I can adjust settings so that it looks like this on one browser, then looks like this on another browser, and so on. Link to comment Share on other sites More sharing options...
jeffman Posted November 2, 2009 Share Posted November 2, 2009 You have the right idea, but the wrong technique. You certainly don't want to get lost in the jungle of browser sniffing, so you're doing one thing for IE, another for Firefox, etc.But CSS provides an easy tool for specifying different rules for KINDS of browsers. This is the @media rule. http://www.w3schools.com/CSS/css_mediatypes.aspYou're sure to find something there that helps. Link to comment Share on other sites More sharing options...
gar onn Posted November 2, 2009 Share Posted November 2, 2009 or, you could use JavaScript to get the navigatorname, and choose an style.var browser=navigator.appName;document.location="index.php?browser="+browser;and then with PHPif (issert($GET['browser'])){echo "here the css tag"} Link to comment Share on other sites More sharing options...
boen_robot Posted November 2, 2009 Share Posted November 2, 2009 What phones? You might want to see some of PPK's mobile compatibility tables... or maybe not, as they will turn you down... it is a real torture to develop a site that works well on any phone (except maybe the iPhone, where it's only a slight hurdle, when you consider the :hover and all that), and developing a site to work on any phone is a whole nightmare.You might use a library like WURFL to sniff the exact phone and browser combo at the server side, but you'll have to tailor your site for only a selected bunch, and give some default (potentially broken) experience to everyone else. Link to comment Share on other sites More sharing options...
george Posted November 6, 2009 Share Posted November 6, 2009 Thanks for the topic and replies. Would not want the cell phone to have the exact same interface as a full sized screen, IMO. Look at what Facebook looks like in monitor mode then in cell phone mode. I would go with the first suggestion, css media type rules. Have you used the media type for printer, so a page prints differently than it displays on the monitor? Same idea. Some pepole will make two seperate pages, one for printing, one for viewing. But both can be effectively rendered as one. Consider Cell phone deserves a scaled down display, for it's scaled down viewing area. IMO Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.