How to integrate CSS into php output

4 posts by 3 authors in: Forums > CMS Builder
Last Post: August 15, 2011   (RSS)

By trebien - August 12, 2011

Quick question... how can I integrate css into the php output.

For instance, using the editor, I want to apply a class to a link. I see a drop-down for applying a class... but where do I put that information so that it pulls up in the editor?

Putting a SPAN or DIV attribute helps with font color, but not <a> tags for the links.

Re: [trebien] How to integrate CSS into php output

By Mikey - August 13, 2011 - edited: August 13, 2011

I think this may be what you're looking for, but first back up your wysiwyg.css and wysiwyg.php files.

Then go to:
cmsbuilder / lib / open "wysiwyg.css" and look for the line and add your css styles below that line.

You may need to add the "styleselect" to the wysiwyg in cms builder. To do this go to
cmsbuilder / lib / open "wysiwyg.php" and look for this line theme_advanced_buttons1 : "formatselect,fontsizeselect,bold,italic,underline,|,justifyleft,justifycenter,justifyright,|,bullist,numlist,|,outdent,indent,|,removeformat,fullscreen", and add the "styleselect" to that line like so:
theme_advanced_buttons1 : "formatselect,fontsizeselect,styleselect,bold,italic,underline,|,justifyleft,justifycenter,justifyright,|,bullist,numlist,|,outdent,indent,|,removeformat,fullscreen",

A thread on this as well:
http://www.interactivetools.com/iforum/Products_C2/CMS_Builder_F35/gforum.cgi?post=88950;search_string=wysiwyg.php;t=search_engine#88950

Re: [zick] How to integrate CSS into php output

By trebien - August 13, 2011

Thanks for the info... that's pretty much it.

For anyone else that comes across this post, in a nutshell, you add the custom CSS into the "wysiwig.css" file and RENAME it "wysiwig_custom.css" - also rename the "wysiwig.php" file to "wysiwig_custom.php" and upload them both.

However, now I have a new problem.

My homepage has 2 content areas... one a white background (dark text), and the other dark (with white text). In the editor, when classes are applied to the text in the second section... you can't see it, because the editor is a white background... and the text is changed to white.

So... I need to apply a dark background to that second content area in the editor. Or, at the least, tell the editor to ignore CSS rules when displaying in it in that second section.

Any help? Surely this is a common problem with CSS and the CMS platform, but I've only found information for changing the CSS for the entire editor.