0

My background image keeps disappearing whenever the screen gets smaller. I want to make it responsive.

This is what I have for my CSS code:

#heading {
  text-align: center;
  color: white;
  background: url('#someimage') top center no-repeat;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size:cover; 
  margin-bottom: 0 !important;
}

This what I have for my HTML Code

<header>
    <div class="jumbotron text-center" id="heading">
        <div class="container intro-text">
        <div class="row">
        <div class="main col-xs-12">
            <h1>Name</h1>
            <hr class="separator separator-light">
            <h2 class="subhead">Name <i class="fa fa-laptop"></i> Name <i class="fa fa-lightbulb-o"></i> Name</h2>
            </div>
            </div>
        </div>
    </div>
</header>
TheThirdMan
  • 1,482
  • 1
  • 14
  • 27

1 Answers1

1

Please try to add "background-size:100%" instead of "background-size:cover"

vignesh
  • 951
  • 5
  • 13