Avatar of UniqueData
Flag for United States of America

asked on 

bootstrap left nav overlap on mobile device

I am EXTREMELY new to bootstrap.  I found code for a fixed left nav that works awesome on a desktop and laptop, but on a mobile device the body overlaps the left nav.  Any suggestions:

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
  <link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
  <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
  <link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-responsive.css" rel="stylesheet">  
<!-- left nav -->
  <div class="col-sm-2">
      <ul class="nav nav-stacked affix" id="sidebar">
        <li><a href="#">Hello</a></li>
        <li><a href="#">About Caroline</a></li>
        <li><a href="#">Services</a></li>
        <li><a href="#">The Studio</a></li>
        <li><a href="#">Testimonials</a></li>
        <li><a href="#">Inspiration</a></li>
        <li><a href="#">Blog</a></li>
        <li><a href="#">Contact</a></li>
<!-- end left nav -->

      <div class="col-sm-7">
          <div class="row"> <!-- body content here -->
                 blah blah

Open in new window

JavaScriptHTMLCSSWeb Development

Avatar of undefined
Last Comment

8/22/2022 - Mon