Reputation: 13
Starting off with html and css and encountered one issue while placing img folder in project file images doesn't appear in the browser and moved the img folder inside the css folder within the project and now it is viewing in the browser.
what is the correct place for img folder for the project is it has to be in css folder or in main project folder?
Thank you in advance
Upvotes: 1
Views: 16279
Reputation: 11
If you have the image folder in the same directory as your html file, then reference that folder and then the image as a path.
Example: src="./pictures/background.png"
Upvotes: 1
Reputation: 46
Probably, you're using absolute paths to reference your images, something like this :
Use relative paths to your 'index.html':
About the place for the images folder, I think is good to have a basic structure like this :
Upvotes: 0