Reputation: 11
please help me! In resources/views/welcome.bale.php:
<link rel="stylesheet" href="{{asset('css/style.css')}}">
<div class="factarea overlay">
<h2>Facts that Make us Unique</h2>
</div>
In public folder: css/style.css
.factarea {background-image: url(../img/website.jpg);}
public/img/website.jpg location
Upvotes: 0
Views: 82
Reputation: 119
I hope the below line will help you to resolve this issue.
You can try this.
You can try with another way like in-line css and check what we getting the image or not. so we can easily find the correct path.
Thanks
Upvotes: 1
Reputation: 12391
use root path
.factarea {background-image: url(/img/website.jpg);}
like this then
websiteurl/img/website.jpg
will work here
websiteurl/public/img/website.jpg
will not work only pretty url will work
so in order to work in public
url as well you have to add inline css
which is
<link rel="stylesheet" href="{{asset('css/style.css')}}">
<div class="factarea overlay" style="background-image: url({{ asset('img/website.jpg') }})">
<h2>Facts that Make us Unique</h2>
</div>
Upvotes: 0