29 Oct 2008, 12:36
Generic-user-small

Michael Considine (4 posts)

Hi,
I’ve just purchased the first two videos and am impressed with them. Great stuff.

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
Ryanirelan_headshot_48x48_pragsmall

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:

<link rel="stylesheet" href="http://localhost/EECore/css/screen/main.css" type="text/css" media="screen, projection" />

30 Oct 2008, 03:28
Generic-user-small

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
Ryanirelan_headshot_48x48_pragsmall

Ryan Irelan (218 posts)

Glad you got it working!

13 Dec 2008, 11:57
Kayavatarflickr_pragsmall

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
Generic-user-small

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
Generic-user-small

Angelo Lebrato (7 posts)

Hi Ryan… THANKSEXCELLENT… I have already 4 Videos… Geat!!!

Only one question,
What are the PROS / CONTRAS to have the index.php CSS in EE (only) or in the Server (too)?
-Other from Editing

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
Angelo Lebrato
(Germany)

03 Mar 2009, 01:39
Ryanirelan_headshot_48x48_pragsmall

Ryan Irelan (218 posts)

What are the PROS / CONTRAS to have the index.php CSS in EE (only) or in the Server (too)?

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.

And How does it look the Code like if I wanna have them in a Template (css_site) and call them out form there!!

Like this:

{stylesheet=template_group/css_template}

04 Mar 2009, 10:55
Generic-user-small

Angelo Lebrato (7 posts)

Great… I’m implementing that already!!

01 May 2009, 21:16
Generic-user-small

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
Generic-user-small

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
Ryanirelan_headshot_48x48_pragsmall

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
Generic-user-small

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
Generic-user-small

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