![]() | CSS not working |
|
29 Oct 2008, 12:36
Michael Considine (4 posts) |
Hi, When I view the rendered index file (located in the site folder ) from within EE, the page does not show the CSS formatting (I’m using the static home page you provide). The address EE uses to render the page is http://localhost/EECore/index.php/site/ I’ve put the CSS folder at the root directory of the site. I’m running EE locally, and in the general configuration setting, the root for the site is set at http://localhost/EECore/ (where EECore is the name of the site). If I view the address http://localhost/EECore/ directly with my browser, the image renders perfectly. Any ideas why the CSS formatting is not showing when rendered by EE? |
|
30 Oct 2008, 01:15
Ryan Irelan (218 posts) |
Hi Michael. Thanks for checking out the screencasts. I’m glad you’re finding them helpful! The CSS path in the templates is set up as a relative path and you probably need adjust it since you’re running EE in a subdirectory. You could even set a URL instead of a path:
|
|
30 Oct 2008, 03:28
Michael Considine (4 posts) |
Many thanks. It works a treat now. I’ll be buying the rest of the series. |
|
30 Oct 2008, 20:39
Ryan Irelan (218 posts) |
Glad you got it working! |
|
13 Dec 2008, 11:57
Kayode Olorunfemi (1 post) |
Ran into the same problem today, thanks for the tip Ryan. Its great to know one is not left banging their head on the wall after buying the screencasts. |
|
31 Jan 2009, 16:32
Simon Douglas (1 post) |
Initially I struggled, because I had a .htaccess file setup, as directed by Leo Murphy, but I managed to hack that in order to access the styles folder in the root. My question is: what is the best method of adding and controlling stylesheets – to have a styles folder in the root, like Ryan does or to create CSS stylesheet templates from within the control panel? Thoughts? |
|
02 Mar 2009, 16:30
Angelo Lebrato (7 posts) |
Hi Ryan… THANKS… EXCELLENT… I have already 4 Videos… Geat!!! Only one question, And How does it look the Code like if I wanna have them in a Template (css_site) and call them out form there!! Thanks again |
|
03 Mar 2009, 01:39
Ryan Irelan (218 posts) |
The pros of keeping your CSS outside EE are that loading your stylesheet doesn’t require database queries. This could help speed up the site (but probably not noticeably). I also like it because I can manage my CSS files using SVN (just part of my workflow). The pros of keeping your CSS inside EE are that all of your styles will be stored in the database and move with the site if you migrate it to a different server. Also, you can use Template Revisions on the css templates and have the ability to revert back to a previous version.
Like this:
|
|
04 Mar 2009, 10:55
Angelo Lebrato (7 posts) |
Great… I’m implementing that already!! |
|
01 May 2009, 21:16
Arbitrary (1 post) |
In this film you say something like “I’ve already uploaded the css and images to the server”. Well, that skipped step makes things confusing. The introductory text of your series of videos positions these videos toward non-programmers and the inexperienced. I found these comments and figured out from the users commenting here that I should place the css and img folders at the root of my site, not in the templates folder. They worked then. It’s just something that should not have been left out. It’s difficult to know with a new program where the application actually runs so relative paths require trial and error. Thanks! |
|
08 Jul 2009, 18:02
Lee Michaelson (9 posts) |
I’m even confused as to what constitutes “the root of my site” for these purposes. We renamed the system folder—is the newly renamed system folder the root of the SITE, then for these purposes, or do you go back even further, to the public folder, or beyond? |
|
11 Jul 2009, 19:06
Ryan Irelan (218 posts) |
Lee, you want to put the CSS files into the public folder. This is most likely the directory that houses the renamed system folder. |
|
02 May 2010, 19:01
Brian K. Shoemake (5 posts) |
What kind of answer is that???? Public folder What? Would that be the as we say in the web design industry: “ROOT”? That was the question was it not???? Just wondering because this seems to be a very common problem that I am experiencing as well and I think it deserves a straight forward answer Ryan. We all spent lots of money on your videos and have invested lots of time and frustration because of the way you left out some key details. The least you could do is give us a clear answer to our valid questions. And what do you mean by “Houses”???? Come on man! |
|
22 May 2010, 15:49
justinkwithj (3 posts) |
Ryan, thanks for this answer. I found it very helpful, as I was experiencing the same problem with my css. |
| You must be logged in to comment |

