SemperFi
SemperFi

Reputation: 2378

Bootstrap-Image not responsive in bootstrap 3

Hi i was trying to create a website with the help of bootstrap 3.3

However I am stuck up with an issue that the image I am using is not responsive ie after a certain period it breaks.

This is the HTML code snippet:-

<div class="img-responsive" id="intro"> <!-- This is the container to display image-->

      <div class="row">
        <div class="col-sm-6 col-md-6 col-md-offset-3 ">
          <div class="box" style="margin-top:62px;">
          <h1>Welcome to my world</h1>
          <p>Welcome to web development program</p>

          <button type="button" class="btn btn-default" id="continue">Continue</button>

          </div>
      </div>
  </div>

The below is my css code snippet:-

#intro{
    background: url('images/prog.jpg') fixed;
    background-size: cover;
    height:650px;
    /*position: fixed;*/
}

#continue{
      margin-left: 218px;
      margin-top: 27px;
      color: blue;
}

Please help me with this.I am not sure why the class img-responsive is not working.

Upvotes: 1

Views: 209

Answers (1)

Nure Alam
Nure Alam

Reputation: 11

  1. img-responsive class for img tag only not for div.
  2. as this is background image, it will not resize but yes, you can use different size image on specific break point

Thanks

Upvotes: 1

Related Questions