Take a look of this link: http://www.arctickiwi.com/blog/mobile-enable-your-ruby-on-rails-site-for-small-screens
On Fri, May 13, 2011 at 8:11 AM, Johan L. <[email protected]> wrote: > Greg Willits wrote in post #692457: > > On Jun 22, 2008, at 1:56 AM, comopasta Gr wrote: > > > >> I want to make the divs of my views to take 100% width for mobile > >> browsers and something else for "pc". > >> > >> How can I detect that? Any hints? > > > > Use JavaScript to detect browser type. > > > > Google > > detect browser agent > > detect mobile browser agent > > > > -- gw > > CSS would be much, much simpler for this: > > div { > width: 80%; > } > > @media handheld { > div { > width: 100%; > } > } > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

