Page 1 of 1

Classes and css

Posted: Sat Sep 20, 2025 6:32 pm
by peters
I am just wondering.
I know that when I generate Styles and save them, the ccs information lives within the web builder project.
I can export the css info into a file and look at it.
Is there any way to configure web builder to use external css classes?
or... can they only be used withing web builder?
I am interested if the ccs file could live outside of the project?
If so, one could fiddle with it and maybe trouble shoot any anomalies.
Thanks to anyone in advance for responding!
Pete,

Re: Classes and css

Posted: Sat Sep 20, 2025 8:35 pm
by pmacdonald
Hi Pete,

The short answers is, yes, absolutely.
It will also work for javascripts you want to keep outside the .wbs file.

You would need to add something like this to to the Page HTML in question in the Between <head></head tags:
<link rel="stylesheet" type="text/css" href="./css/mystyles.css" />

If you are using a Master Page then you could just add it there for all pages that use the master page.
The location of the style sheet is up to you and your code would need to reflect that location, mine is just an example.

The longer answer is that you have to know what you are doing and should be familiar with the File Publisher object so that your file(s) get published with the rest of the project.

Not the complete answer but it is a starting point. :D

Regards,
Parker

Re: Classes and css

Posted: Sat Sep 20, 2025 9:23 pm
by BaconFries
If you use the following Options --> HTML and tick to use Optimize/move inline styles to external style sheet then as it says a css file will be generated and the appropriate reference will be added between the <head></head> tags*.

Now if you were to open and modify it externally then save it and open the project again then the object that uses it and ou make any changes to it again save in the project then any and all modifications you made externally will be overwritten/lost.

As Parker has wrote you can use any external css/javascript and then import into the software and place in the File Publisher then reference it in the <head></head>tags*

If using the likes of javascript/jquery then you need to be careful of the version as it may cause you issues if it conflicts with any and all scripts that you have used within the software as there can only be one version.

Re: Classes and css

Posted: Sun Sep 21, 2025 9:26 am
by wixily
My little experience and advice.

I will rather you keep the files as they were generated to avoid you going back to make changes each time you update your website. Pablo did a wonderful job in that you can use your own css, js or php code right within the software and it will overwrite the generated code. Just know where to place your custom code. Assuming you place your css within the <head></head> while doing that ensure the object is targeted properly know when to use for example #wb_Layergrid1 and #Layergrid1.

Re: Classes and css

Posted: Sun Sep 21, 2025 12:00 pm
by peters
Thanks so much folks!

Re: Classes and css

Posted: Sun Sep 21, 2025 2:44 pm
by VictorKrs
Hello, dear WWB users!
Please specify when the #wb_Layergrid1 construction is used, and when is #Layergrid1?
I can't find any information on this issue:(

Re: Classes and css

Posted: Sun Sep 21, 2025 3:57 pm
by Pablo
A layout grid always has the 'wb_' prefix for the outer wrapper, the inner wrapper uses the ID only.

Re: Classes and css

Posted: Sun Sep 21, 2025 7:32 pm
by VictorKrs
Thank you for the information!