css - jumbotron background image doesn't show -
i want show image in background doesn't show:
<div class="jumbotron jumbotron-fluid background: url('/assets/img/mhacks.jpg') no-repeat center center;"> <div class="container text-sm-center p-t-3"> <h1 class="display-2">mona jalal</h1> <p class="lead">under construction</p> </div> </div> p.s.: in general how can debug such faults? here's jsfiddle: https://jsfiddle.net/e5qsnjdo/
with following code:
<div class="jumbotron jumbotron-fluid style="background-image: url('/assets/img/mhacks.jpg') no-repeat center center;"> <div class="container text-sm-center p-t-3"> <h1 class="display-2">mona jalal</h1> <p class="lead">under construction</p> </div> </div>
move background property style attribute:
<div class="jumbotron jumbotron-fluid" style="background: url('/assets/img/mhacks.jpg') no-repeat center center;"> or define in css follows:
.jumbotron { background: url('./assets/img/mhacks.jpg') no-repeat center center; } // notice . before /assets if don't use . give 404 error -




Comments
Post a Comment