Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twitter Bootstrap's responsive CSS works on resized window, but not on mobile

I've used Twitter Bootstrap framework to build my newest site. I used boostrap.responsive.css to make it work on mobile devices. But it doesn't. It seems like it doesn't see the CSS at all. When I ran it on my Android phone, it was displaying my site just like my PC. But when I resize my browser window on PC, it works great. What can be the problem? I haven't messed with bootstrap's css.

When I ran alert($(window).width());, it returned 980.

like image 844
Tomek Buszewski Avatar asked Feb 18 '13 17:02

Tomek Buszewski


1 Answers

Make sure to include the meta viewport element as instructed in Bootstrap's responsive docs so the layout will scale to the device width.

<meta name="viewport" content="width=device-width, initial-scale=1.0">
like image 146
Sara Avatar answered Oct 14 '22 07:10

Sara