Reputation: 1
The image of the Navigation background went missing when I upload my website to the server. Everything else works fine. What can be wrong here?
navbar-default {
background: url(img/meshH.png);
padding: 10px 0;
box-shadow: 0 0 3px #ccc;
font-weight: 500;
padding-bottom: 18px;
Upvotes: 0
Views: 60
Reputation: 111
May be the problem is with image path, better to give the path by adding ../ at beginning. It means the current folder then add the image path.
like background: url(../img/meshH.png);
or
background-image: url('img/meshH.png');
Upvotes: 1
Reputation: 37
If your CSS file is located in a directory in your root folder, you might have to append ../
to the url in order to target the img folder properly like so:
background: url(../img/meshH.png);
Or
background-image: url(../img/meshH.png);
The path starts in your CSS directory, so you need to go up one folder.
Upvotes: 0
Reputation: 1709
'img' folder should be at the root of your virtual directory, say the web site name is MyWebSite and it's physically pointing to C:\MyWebSite, so 'img' folder should be C:\MyWebSite\img.
Upvotes: 0