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. ??? ??? ??? Quote Link to comment 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 Quote Link to comment 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> Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.