I placed a green PNG image as background to a div and it looks like this:
I used a CSS hack in order to keep the text inside the green background. So this is my code for that section:
#aboutprocess {
background: url("../img/tech_bg.png") no-repeat left top;
width: 100%;
background-size: cover;
}
#aboutprocess .container {
padding-top: 32.6316%;
position: relative;
}
#aboutprocess .row {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
#aboutprocess p {
color: #ffffff;
text-align: center;
}
<section id="aboutprocess">
<div class="container">
<div class="row">
<div class="col-md-8 ">
<p class="text-center">Our agile team continuously delivers working software and empowers your organization to embrace changing requirements.</p>
<button type="button" class="btn btn-link center-block white" role="link" type="submit" name="op" value="Link 2">about our process</button>
</div>
<!--end col-md-8 col-md-offset-2-->
</div>
<!--end row -->
</div>
<!--end container-->
</section>
<!--end aboutprocess-->
I want to replace the PNG with an SVG file, and the only thing that I changed in the CSS is the file extension:
#aboutprocess {
background: url("../img/tech_bg.svg") no-repeat left top;
width: 100%;
background-size: cover;
}
But when I preview this in browser, I can't see the background anymore:
What am I doing wrong? You can see the demo page with the PNG background image here.
Here's a Dropbox link to the SVG file.