If you have a stylesheet in app/webroot/css/main.css your layout file should have:
echo $html->css('main'); Note that you do not include the extension, nor the directories. If your stylesheet is in a subdirectory, app/webroot/css/some_dir/main.css: echo $html->css('some_dir/main'); It's pretty much the same principle as with $javascript->link() On Fri, Apr 24, 2009 at 5:12 AM, christopher <toze...@hotmail.co.uk> wrote: > > Thats great I have that done, I am struggling more with the correct > code to place in the default.ctp and if I have to call the CSS any > where else. Thanks for your reply so far. > > On Apr 24, 1:49 am, brian <bally.z...@gmail.com> wrote: >> By default, your stylesheets should be in webroot/css. >> >> >> >> On Thu, Apr 23, 2009 at 3:32 PM, christopher <toze...@hotmail.co.uk> wrote: >> >> > Hi could anyone tell me how to use my own CSS style sheet in Cake >> > PHP. I have just started using CakePHP and am having difficulty. >> > I have created teh default.ctp file in the web root and the CSS file >> > in the views layout folder but I think the default code is wrong. >> >> > Would appreciate a simple guide on how to set it up. >> >> > Thanks- Hide quoted text - >> >> - Show quoted text - > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---