Reputation: 1
I'm designing a website but I used a base template that I found and now I'm modifying it. I'm using a web hosting service, so the root directory isn't on my computer. So, inside public_html I have /js/ javascript files and /css/ CSS files. In the root folder I have my home page etc, but I want to put the store's page in /store/storehome.php. I'm using .php so that I can include the header.html and footer.html files which are located in /includes/. All the JS and CSS files are not mine, and I'm just editing them to serve my desires.
The issue is that the storehome.php file will not format correctly. I don't fully understand what it's missing (I'm new to this) but I assume it's not seeing the CSS file.
I've been referencing the CSS through the header file, and it seems to work for the normal root files. This is part of the header file:
<head>
<title>My Website</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<link href='http://fonts.googleapis.com/css?family=Oxygen:400,300,700' rel='stylesheet' type='text/css'>
<!--[if lte IE 8]><script src="js/html5shiv.js"></script><![endif]-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="http://mywebsite.com/js/skel.min.js"></script>
<script src="http://mywebsite.com/js/skel-panels.min.js"></script>
<script src="http://mywebsite.com/js/init.js"></script>
<noscript>
<link rel="stylesheet" href="http://mywebsite.com/css/skel-noscript.css" />
<link rel="stylesheet" href="http://mywebsite.com/css/style.css" />
</noscript>
<!--[if lte IE 8]><link rel="stylesheet" href="css/ie/v8.css" /><![endif]-->
<!--[if lte IE 9]><link rel="stylesheet" href="css/ie/v9.css" /><![endif]-->
</head>
And no matter what, even if I do /css/style.css or ../css/style.css or the domain like above, nothing works. The weird thing is that if I comment out the lines referencing the CSS, my root files will still be correctly displayed, even though they never reference the CSS file other than in the header. Does this have something to do with the .js files? I have no idea how they work and I havent touched them. Thanks!
Upvotes: 0
Views: 106
Reputation:
Late, but nevertheless... Looking at your header, the only css loaded comes from google. The other two are within noscript, so where are you getting your css from in the first place?
Upvotes: 0
Reputation: 9992
You have problem here
<noscript>
<link rel="stylesheet" href="http://mywebsite.com/css/skel-noscript.css" />
<link rel="stylesheet" href="http://mywebsite.com/css/style.css" />
</noscript>
Remove <noscript></noscript>
And it should be like
<link rel="stylesheet" href="http://mywebsite.com/css/skel-noscript.css" />
<link rel="stylesheet" href="http://mywebsite.com/css/style.css" />
and move you JS
files below CSS
Upvotes: 2