Reputation: 127
I want to put image as header's background and I tried this and it doesn't work.
.header-fit {
background-image: url('{{ asset('img/justice.jpg') }}');
max-height: 100%;
height: auto;
width: 100%;
}
<header id="home" class="header-fit">
<div id="maincontent" class="container" tabindex="-1">
<div class="row">
<div class="col-lg-12">
<div class="input-group">
<input type="text" class="form-control" placeholder="@">
<span class="input-group-btn">
<button class="btn btn-default" type="button">Search</button>
</span>
</div>
</div>
</div>
</div>
</header>
Upvotes: 0
Views: 1061
Reputation: 1084
I guess this css would be worked solution for you if path to image is correct
.header-fit {
background-image: url(img/justice.jpg);
max-height: 100%;
height: auto;
width: 100%;
}
Here is you would read some info regarding usage of background-image
property
Upvotes: 1