I am relatively new to web development and am running into some trouble with bootstrap/CSS. I am attempting to have a background image behind the default bootstrap jumbotron. On top of this, I also can't seem to get the image to show up at all. I am a little lost. Any help would be much appreciated.
My code snippets are below:
@import "bootstrap-sprockets";
@import "bootstrap";
/* background */
.jumbotron {
font-family: 'Josefin Slab', serif;
font-size: 17px;
}
.jumbotron .container {
position:relative;
z-index:2;
padding:2rem;
background: rgb(231, 231, 231);
border-radius: 17px;
}
.jumbotron-background {
object-fit: cover;
font-family: 'object-fit: cover;';
position: absolute;
top:0;
z-index:1;
width:100%;
height:100%;
}
.center {
text-align: left;
font-size: 17px;
position: relative;
overflow: hidden;
}
.imgBg {
content: url("../images/sw_web_backdrop.jpg");
}
...
<div class="jumbotron jumbotron-fluid bg-dark">
<div class="jumbotron-background">
<img class="imgBg" alt="smallworld network"/>
</div>
<div class="container">
<h1> [content]</h1>
<h2>[content]</h2>
<p>
[content]
</p>
<div id="surveyContainer">
<%= javascript_include_tag('survey_jquery.js') %>
<%= javascript_include_tag('mvp_survey.js') %>
</div>
</div>
</div>