Search code examples
iphoneandroidweb-applicationsmobile-safarimobile-website

Mobile websites - CSS floats


I'm designing a mobile version of my website. I have been looking at Amazon and notice that they seem to shy away from using float:left/right and instead use tables in the few cases where the layout requires something on the left and something on the right.

My question is should float:left/right be avoided when designing for mobile devices. It seems kind of retro to use tables for layout.


Solution

  • There's no reason not to use float for mobile, especially iPhone, new Blackberry browsers and android devices etc.

    Older devices might have issues with CSS layout, which could be why amazon use tables, with their varied audience, although I don't think they should be.

    Just find as many devices you can to test on, and you can always think about using responsive design to cater for different devices - http://www.alistapart.com/articles/responsive-web-design/