The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other REALLY weird relative file path issue.

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #158214

    Today I’m coding kind of a little webapp thingy. I’m starting on a basic little nav with icon buttons. I attempt to use a relative file path:

    <div class="button">
        <img src="images/plus.svg">

    It doesn’t work. Yes, the subdirectory “images” is in the same directory as index.html. Yes, plus.svg actually exists. Everything is as it should be. So, I pull my icons out of “images” and into the root directory with index.html. Then, I re-write the file path (of course). Everything works fine! Then, I create a new subdirectory called “test”.

    *THIS is where it gets weird! I put all the icons inside test, and re-write the file path to read:

    <div class="button">
        <img src="test/plus.svg">

    What do you know? They work! The issue is: “test” was created in that directory and “images” was created elsewhere and dragged into that directory.

    For some reason, my html is only working with subdirectories that were created in the root directory from the start! WEIRD RIGHT?


    Additional info: I run Fedora 18 and “images” was created and named in Windows 7. Could that be the issue?


    Weird enough but then again, I know nothing about Fedora. Why not rename the “images” folder to “whatever” and then rename “test” to “images”?


    This happens to me sometimes on Linux, it’s most likely permissions issue.

    Open your terminal and navigate to the folder, then do ls -laand check permissions. If you need to change permissions just do sudo chmod 775 -R <folder-name>

    See if that works.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Other’ is closed to new topics and replies.