Search code examples
htmljquerycssoffline

How can I run an offline demo page from a folder(which needs to be movable)?


How can I create a demo page (HTML file) that runs from a folder that(here's the tricky part) is able to be relocated without interrupting the stylesheet/JavaScript links?

Obviously I can create a page offline and set the base tag to the containing folder, but if the folder were to be moved, for instance to another computer, the links would be broken and all the styling and coding would disappear from the page. I've seen this done, so I know it's possible, but I haven't been able to figure it out.

I realize I could just place the styling and JavaScript within the HTML file itself, but I would like to avoid this as it would get quite messy.


Solution

  • What about using relative paths for css,images and etc?