I’ve been researching CSS for handhelds of late. Chapter 15 for my new book is about CSS for handhelds—Chapter 15, does that mean I’m almost finished—yes! It’s been tough finding information and testing the CSS I’ve written in ways that yield reliable information. Consider this:
- Some devices, especially phones, use only WAP (Wireless Application Protocol). Phones labeled WAP2 can use regular websites with XHTML and CSS.
- Some devices, such as the BlackBerry, offer users a choice between WAP and regular browsing.
- Some devices only support HTML 3.2. Some support HTML 4. Some support XHTML.
- Some devices support CSS. Some do not. Those that do support CSS understand
- Some phones apply screen styles as well as handheld styles; others ignore both.
- Screen widths range from 100 pixels to 320 pixels for phones.
- Screen widths range from 320 pixels to 640 pixels for PDAs.
- Some devices have monochromatic screens. Some have color.
- Some software, such as AvantGo on either a phone or a PDA, offer users a choice as to whether they want images to display or not.
metaelement declaring the document
Testing is a nightmare, too, because there aren’t enough easy to find and use emulators and simulators available.
I’ve been able to come up with a few helpful ideas for CSS for handhelds, but I think we still have a long way to go before there’s much predictability in this area. My advice for now is to make lavish and liberal use of
display: none for nonessential parts of your pages and make sure your color contrast is going to work on a small screen. Check your pages with CSS switched off to make sure they linearize sensibly (good semantic HTML is the underpinning of everything no matter what kind of device you’re designing for). Provide skip navigation links or other navigation aids to make the pages easier to work through.
Drawing near the close of the writing work on the new book makes me aware of how much I’ve neglected Web Teacher in the last few months. This little excerpt from what’s coming is my way of making peace and promising to be back soon with lots more.