-4
background-image: url(../images/title2);

im also trying to apply it to a container

i have a rootfolder called learning project inside it looks like this

this is what it looks like inside

My html page is inside html and my css is inside css both called index I'm trying to get from my css to my image folder to title2 which is just a random name and it wont work

Can anyone help?

Ivam
  • 379
  • 3
  • 12
  • Partial URLs are interpreted relative to the source of the style sheet. You'll also need to reference the image's file extension. – Obsidian Age Jul 09 '18 at 21:00

1 Answers1

2

wrap the relative url in quotes and thats it

background-image: url('../images/title2');
Harkal
  • 1,770
  • 12
  • 28
  • 1
    I'm not sure why this was upvoted, as not only will it not work (due to the missing file extension), but [**quotation marks are entirely option**](https://stackoverflow.com/a/851753/2341603). – Obsidian Age Jul 09 '18 at 21:14
  • @ObsidianAge only people without brain will not put extension after the file name. sry brother but if u r pro u must not look for small things no one has time to cry about small things – Harkal Jul 09 '18 at 21:16
  • you didn't add extenstion, so you don't have brain? – Temani Afif Jul 09 '18 at 21:31
  • @TemaniAfif earth is not flat by the way. lol. just chill brother thats for the sake of guidance and what i said was if someone doesn't use an exteniosn after havinng a look at this demo might not be havinng a brain – Harkal Jul 09 '18 at 21:34
  • By the way, you can read the duplicate question to see that your answer is wrong ... like @ObsidianAge I don't know why it's getting upvoted. – Temani Afif Jul 09 '18 at 21:48
  • just because earth is not flat – Harkal Jul 09 '18 at 21:49