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: [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.

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

By Jason - August 15, 2011

Hi,

You can set a css class that changes the background to black (it sets this in a span tag) and the font color to white. That way you can see what your typing. For example, in wysiwyg_custom.css you can use a class like this:

.whiteTextOnBlackBackground{background-color:black;color:white;}

You can then select this when you need to use it in your wysiwyg editor.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/