ahetman
ahetman

Reputation: 1284

How to add an additional theme to a Bootstrap web project?

I am using a theme from Bootstrap and would like to add a new un-styled theme page from the same site, which comes with it's own files:

css
--bootstrap.css
--bootstrap.min.css
--style.css
js
--bootstrap.js
--bootstrap.min.js
--jquery-1.11.0.js
newpage.html


As far as I can tell, only the newpage.html and the style.css files are different from what I already have from the current theme. I added the newpage.html and the style.css to my project. However, when I open the new page, the content is there, but it seems to be missing all of the css and the js components. I suspect it might be a path issue.
My project structure with the new files, looks like this (simplified):

css
--style.css
js
pages
--newpage.html
index.html


In the newpage.html file, the css and the js are linked like so:
<link href="/css/bootstrap.min.css" rel="stylesheet">
<link href="/css/style.css" rel="stylesheet">
<script src="/js/jquery-1.11.0.js"></script>
<script src="/js/bootstrap.min.js"></script>
All of these files are there and accounted for. When I linked to the new page, I had to use this path: "./pages/newpage.html"
What am I doing wrong?

Upvotes: 0

Views: 85

Answers (1)

arinh
arinh

Reputation: 206

Try traversing up the directory with all the paths you are trying to include, traversing is denoted as '..'

Example:

<link href="../css/style.css" rel="stylesheet">

Upvotes: 1

Related Questions