How to make your website mobile today

It's 2010 and your users are on smartphones and iPads. Here's how to make sure your website is too

Don't get me wrong: The Palm and Apple devices had their share of fun quirks as well. Happily, there are free emulators for them, which you can get from the Palm Developer Center and Apple's iPhone Developer Program, respectively.

The end result is shown in Figures 4 through 8. No, they aren't identical; with screen sizes that vary as much as these devices do, they shouldn't be. But they're all clear and readable, and that's what matters when you're on the move.

With some simple Web technologies, it's not difficult to make your site feel friendly to even the smallest among us. Hopefully, you've seen that you can get a start without a whole lot of effort.

After you've become comfortable with these techniques, you can take the next step and work with the user agent detection method I described for Android. From there, you can detect other devices and load specific style sheets for each to invoke more layout-oriented CSS functions. For example, you may end up showing and hiding divs, placing divs in different locations, or actually changing the layout of a Web page based on the mobile device accessing it -- but that's for another day.

This article, "How to make your website mobile today," originally appeared at Follow the latest developments in mobile technology and programming at

Read more about software development in InfoWorld's Developer World Channel.

Dori Smith is the co-author (with Tom Negrino) of "JavaScript & AJAX for the Web: Visual QuickStart Guide," 7th ed., and "Styling Web Pages with CSS: Visual QuickProject Guide."

This story, "How to make your website mobile today" was originally published by InfoWorld.

| 1 2 Page 3
ITWorld DealPost: The best in tech deals and discounts.
Shop Tech Products at Amazon