Adding a style sheet to CGB - Post ID...

User 2220522 Photo


Registered User
14 posts

Probably a dumb question - I have a menu that requires styling. I have added the CSS to the header section under the settings tab - that works. But, I want to put all that CSS into an external style sheet and reference it in the header, but I don't know where CGB looks for such sheets. I can slip the file into the exported style sheet directory and reference it there, but that only works when you export everything (not when you try an get a quick preview). Also, I would like CBG to export everything needed and not have to remember to add that file to the directory.

So I need a reference relative to the project directory but I can't seem to find one that works. I hope my explanation isn't clear as mud. Thanks in advance for any help.
User 244626 Photo


Registered User
628 posts
Online Now

In your resources, create a folder called css. Highlight the folder and then chose Add Files. Import your stylesheet.

Delete the custom code you added to the head section. Then in the head section choose "Add Resource" and choose the stylesheet in the css folder you created.

When you export your project, the stylesheet will be added to your main css folder. Then same procedure can be used on js scripts which are usually put in the footer. (Create a js folder first).
User 2220522 Photo


Registered User
14 posts

Thanks a million Twinstream. Makes perfect sense. So far loving CGB, just hope more documentation is on the way ;).
User 244626 Photo


Registered User
628 posts
Online Now

Brian Durfee posted this informative article (link) which is very helpful .... (Thanks Brian)

https://medium.com/@weldebob/layout-des … c8e4187132


Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.