5

I'm using Bootstrap 3.0 panels and trying to figure out why a page is not responsive on mobile devices. It displays properly on a desktop browser, but doesn't view optimized on mobile devices.

The panel examples on the Bootstrap site do indeed display optimized on mobile.

Am I missing something?

Here's the html:

<!DOCTYPE html>
<html lang="en">
  <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
  <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">

  <title>a title</title>
  </head>

  <body>  
    <div class="container">
      <div class="row">
    <div class="panel panel-default">
      <div class="panel-body">
        <div class="media">
          <div class="media-body">
        <div class="row-fluid">
          <div class="row">
            <div class="col-md-12"><h1 class="media-heading">This is a heading using h1s.</h1></div>
          </div>
        </div>
        <br>
        <div class="row-fluid">
            <div class="span4 top-buffer">

            </div>
        </div>
          </div>
        </div>
        <br>
      </div>
    </div>
      </div>    
    </div>  
  </body>
</html>

1 Answer 1

18

Looks like you're missing a viewport tag in the head of your HTML. Docs

Like this:

 <meta content='maximum-scale=1.0, initial-scale=1.0, width=device-width' name='viewport'>

Except it could be argued that disabling zoom is a bad idea if your text is too small to read, so take care to test it on a variety of devices with different users in mind.

Sign up to request clarification or add additional context in comments.

3 Comments

Awesome. That was it!
Yes, disabling zoom is usually A Bad Thing™. Remove maximum-scale=1.0, to bring it back :)
This was a real live saver!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.