I've attached a screenshot of the code I'm using to link to the CSS files on my server. Am I using the wrong path??
The site I'm working on is http://www.bookslibrarianslove.com/index.php/Pages
Many Thanks!
ExpressionEngine® Answers is a question and answer site for administrators, end users, developers and designers for ExpressionEngine® CMS. It only takes a minute to sign up.
Sign up to join this communityI've attached a screenshot of the code I'm using to link to the CSS files on my server. Am I using the wrong path??
The site I'm working on is http://www.bookslibrarianslove.com/index.php/Pages
Many Thanks!
Yes, you are. And your question is almost off topic.
{
and }
. You should put variables there, not only paths. Path variables are a little different. You can study all about it on Template Language Overview;public_html
is usually the folder where the website is. Everything accessible from web is inside this folder, so you need to point to its contents, not to the folder itself;/
are followed from the domain root. They're called "root relative paths". For example, /my-file.gif
can be accessed from anywhere on the domain;/
as first character are followed starting at the folder you already are. They're the "relative paths". For example, if you are on http://domain.com/page_1/page_23
, a path like my-file.gif
will point to http://domain.com/page_1/page_23/my-file.gif
. They can give you headaches;{stylesheet='template_group/css_template'}
, but you usually don't need that;Since the CSS isn't being served by EECMS, you can point directly to it in two ways. Using a root relative path:
<link rel="stylesheet" href="/css/style.css" />
Or an absolute path:
<link rel="stylesheet" href="{site_url}/css/style.css" />
EECMS will replace the {site_url}
variable with the setting used on URL to the root directory of your site on Control Panel. Pay attention to not have double /
or a missing one.
Nope! , erm, I mean Yup! You have the wrong value for the src
parameter.
<link rel="stylesheet" href="{site_url}css/style.css" />
Use that (assuming this is an ExpressionEngine parsed template). You might need to add a /
after {site_url}
, depending on what your site url config var is set to.
<noscript>
block??
Oct 8, 2015 at 22:47