html - Relative link in CSS -


i need 1 situation. creat file structure :

  • mainfolder
    • index.html
    • imgfolder
      • bg.jpg
    • cssfolder
      • style.css

i need link picture bg.jpg relative url in css style file :

background-color: url('?'); 

i try

/img/bg.jpg ../img/bg.jpg 

but, it's not working. :)

just add lines of php in html using getcwd() sure relative path correct.

btw: in unix systems:

  • / refers root directory
  • ./ refers current directory
  • ../ refers directory, in current directory is

Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -