Eyes Posted February 13, 2008 Share Posted February 13, 2008 Impressive forum you got here. I tried to search but did not find the answer, so I gonna post here: How can I get information on the desktop size on the browser of the user connecting to the site? The size of the actual browser window will also do. Feedback like 600*480, 800*600, 1280*1024 is intended to run 2 different css in order to both show a nice layout for the modern pc, and a slim but working version for some old hardware. ??? ??? ??? Link to comment https://forums.phpfreaks.com/topic/90905-get-users-desktop-size/ Share on other sites More sharing options...
dooper3 Posted February 13, 2008 Share Posted February 13, 2008 Hey, Did a quick google and found this - I think you must have been using the wrong words to search! lol. Hope it helps: http://www.webmasterworld.com/forum88/12954.htm Link to comment https://forums.phpfreaks.com/topic/90905-get-users-desktop-size/#findComment-465905 Share on other sites More sharing options...
phpQuestioner Posted February 13, 2008 Share Posted February 13, 2008 try this: <script language="javascript"> var wide = screen.width; var heigh = screen.height; if (wide == "800" && heigh == "600") { document.write("<link rel='stylesheet' type='text/css' media='screen' href='800X600' />"); } else if (wide == "1024" && heigh == "768") { document.write("<link rel='stylesheet' type='text/css' media='screen' href='1024X768' />"); } else { // add alternate stylesheet for other screen resolutions } </script> Link to comment https://forums.phpfreaks.com/topic/90905-get-users-desktop-size/#findComment-466307 Share on other sites More sharing options...
Eyes Posted February 15, 2008 Author Share Posted February 15, 2008 Thank you so much Just what i needed. I will test this weekend /bow Link to comment https://forums.phpfreaks.com/topic/90905-get-users-desktop-size/#findComment-467515 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.