title: Making carousel image fit for mobile device in bootstrap
body: <p>I have created a basic website for a mates brewery, but when viewed on a mobile device, the carousel image is condensed and doesn't adjust to the size of the screen. Ive tried editing the CSS file, which in turn helped adjust the image when resizing on a PC, but didnt help with the mobile device..</p>
  
  <p>the website is temporarily sitting here <a href="http://west.net16.net/" rel="nofollow">http://west.net16.net/</a></p>
  
  <p>Thanks in advance</p>
  
  <pre><code>/* Carousel base class */
  .carousel {
    height: 100%;
    margin-bottom: 60px;
  }
  /* Since positioning the image, we need to help out the caption */
  .carousel-caption {
    z-index: 10;
  }
  
  /* Declare heights because of positioning of img element */
  .carousel .item {
    height: 500px;
    background-color: #777;
  }
  .carousel-inner &gt; .item &gt; img {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 100%;
    height: 100%;
  }
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code> &lt;div id="myCarousel" class="carousel slide" data-ride="carousel"&gt;
    &lt;!-- Indicators --&gt;
    &lt;ol class="carousel-indicators"&gt;
      &lt;li data-target="#myCarousel" data-slide-to="0" class="active"&gt;&lt;/li&gt;
      &lt;li data-target="#myCarousel" data-slide-to="1"&gt;&lt;/li&gt;
      &lt;li data-target="#myCarousel" data-slide-to="2"&gt;&lt;/li&gt;
    &lt;/ol&gt;
   &lt;div class="carousel-inner" role="listbox"&gt;
      &lt;div class="item active"&gt;
        &lt;img class="first-slide" src="IMGS/header1.gif" alt="west city brewing"&gt;
       &lt;div class="container"&gt;
          &lt;!--&lt;div class="carousel-caption"&gt;
            &lt;h1&gt;Example headline.&lt;/h1&gt;
            &lt;p&gt;Note: If you're viewing this page via a &lt;code&gt;file://&lt;/code&gt; URL, the "next" and "previous" Glyphicon buttons on the left and right might not     load/display properly due to web browser security rules.&lt;/p&gt;
            &lt;p&gt;&lt;a class="btn btn-lg btn-primary" href="#" role="button"&gt;Sign up     today&lt;/a&gt;&lt;/p&gt;
          &lt;/div&gt;--&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>