开发者

Mobile version of my website, what design width is optimal? [closed]

开发者 https://www.devze.com 2022-12-17 04:05 出处:网络
Closed. This question is opinion-based. It is not currently accepting answers. 开发者_运维问答 Want to improve this question? Update the question so it can be answered with facts and citati
Closed. This question is opinion-based. It is not currently accepting answers.
开发者_运维问答

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 4 years ago.

Improve this question

I'm going to create mobile version of website...

What width should I choose for design? I know that every device have it's own screen width and it's really difficult to fit all devices...

I'm really confused (pretty new to mobile websites world), please help.

Thank you.


Your approach will depend on how much effort you want to (or can) put into this and what range of mobile users you want to target. For minimal effort, simply use 100% as KennyTM points out and expect your website to be browsed on screen widths from 128px to 480px . With this approach, you'll also need to avoid 'advanced' xhtml directives such as css and divs (and javascript) because most mobile browsers cannot handle some aspects of these. Plan to use tables to manage layout.

For a more advanced approach, you can use an open source project called WURFL (http://wurfl.sourceforge.net/) which is a database of mobile browsers and their capabilities (screen width, support for div, css, images etc...). It has a jsp tag library called WNG where you write once and the tag lib will render the most appropriate html to match the user's device. I believe there is also a PHP library for this.

Rgds, Kevin.


For this sort of question, I can highly recommend reading the MobiForge developers' guide. Lots of useful advice in there, including how to pick the compromises that inevitably result from mobile development.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号