Heemal Akshay Kumar
Heemal Akshay Kumar

Reputation: 1

Problems when uploaded website onto the server

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

Answers (3)

Mallikarjun
Mallikarjun

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

nitroxis
nitroxis

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

Sudipta Kumar Maiti
Sudipta Kumar Maiti

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

Related Questions