dunderhonung Posted March 12, 2012 Share Posted March 12, 2012 Is it possible to show different content depending on mobile device? I would like hide some stuffs like pictures and sidebars for handheld devices without using display:block in the css. Quote Link to comment Share on other sites More sharing options...
Muddy_Funster Posted March 12, 2012 Share Posted March 12, 2012 That's one for javascript/AJAX. But yes, it is possible. Quote Link to comment Share on other sites More sharing options...
Zola Posted March 12, 2012 Share Posted March 12, 2012 You can set them to display none via media queries in CSS ? Or you could rearrange your layout depending on the devices screen size. Quote Link to comment Share on other sites More sharing options...
redsmurph Posted March 12, 2012 Share Posted March 12, 2012 A tried solution that works on the server side is WURFL. I use the database version. Nowadays you can determine at least display size via Javascript instead. WURFL provides much more than that though, e.g. supported media file formats etc. The issue with WURFL is that it's never up-to-date, as new mobile devices are released daily. The PHP library tries to find near matches if there's no exact user agent match, but it doesn't always find something comparable. Quote Link to comment Share on other sites More sharing options...
dunderhonung Posted March 12, 2012 Author Share Posted March 12, 2012 That's one for javascript/AJAX. But yes, it is possible. Can I do it without JS? my school instructions dont let me use JS.. :/ Quote Link to comment Share on other sites More sharing options...
dunderhonung Posted March 12, 2012 Author Share Posted March 12, 2012 You can set them to display none via media queries in CSS ? Or you could rearrange your layout depending on the devices screen size. If I set them to display none it will still load the pictures ? 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.