11

I'm new to twitters bootstrap. What want to know is the HTML mockup that i have to use for a full screen responsive background image with bootstrap?

certainly I'm suing the mockup

<div class="container-fluid">

<div class="wrapper">

</div>


</div>

Before the wrapper i do have a navigation menu. I want to add a full screen image to div class wrapper. and i want wrapper div to scale 100%. any tips will be greatly appreciated.

1
  • you should consider looking at some examples
    – Bone
    Jul 13, 2014 at 11:00

1 Answer 1

23

Two options

  1. use img-responsive class if you are using tag.

    <div class="wrapper">
       <img src="pic_1.jpg" class="img-responsive" alt="Responsive image">
    </div>
    
  2. if you are using css use this.

    .wrapper{background: url('/assets/64531/green_suburb.jpg') no-repeat   center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;}
    
1
  • This solution doesn't seem to work on Chrome for Android for me. Is there a workaround for that?
    – KevinAdu
    Oct 1, 2015 at 0:56

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.