FCK editor styling issue

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
10/27/2009 11:30:34 AM
Gravatar
Total Posts 2253

Re: FCK editor styling issue

It all depends on what is in the style.css. For instance; if you don't have H1 defined in your CSS, all of the editors are going to style it according to their default.

A quick check, how do you define your default font for your site? Most of the provided skins define it in the body selector:

body {font: 70%/1.5 Verdana, 'Trebuchet MS', arial, sans-serif;}

If you are defining the font with a unique selector, the editors aren't going to know that.

-Joe D.

10/27/2009 12:36:07 PM
Gravatar
Total Posts 160
mojoPortal Community Expert
Designer of over 25 unique and custom mojoPortal sites with DMSQD and sister company, The Design Loft - www.dmsqd.com

Re: FCK editor styling issue

Hi Joe I'm just out the office now so I'll double check tomorrow but I think the body is styled using .pagebody as the selector. That said though I recall that the designer who did the original code was VERY specific with css, almost to a fault. For example most of the styles are this specific: #container #maincontent #center-nomargins p {style:here;} Reckon that could be impacting by being too specific? Thanks Mark
10/27/2009 1:07:25 PM
Gravatar
Total Posts 18439

Re: FCK editor styling issue

That would definitely be the problem.

You should only use those selectors for main layout not for fonts or colors because those ids only exist in layout.master and layout.master is never loaded inside the editor. Actually the .pagebody class on the body of layout.master is designed specifically for when you don't want styles from the body in the editor. The editor does not have the pagebody class on the body of the html inside its iframe. It is used in cases for example where you have a background color or image on the body that you specifically don't want to show up in the editor. For example the background color of the body may be much different than the background color of modulecontent so in order to avoid the body background from being used in the editor we add a pagebody class to the body in layout.master and then apply the background to that class instead of directly on body{}. Skins where the background of the body is the same as the content don't need the pagebody class.

So any of those selectors that use ids from elements in layout.master are not going to work in the editors and therefore its better to not use them for styling content, there are plenty of other css selectors that will do the job and work correctly with the editor.

Hope it helps,

Joe

10/27/2009 1:12:37 PM
Gravatar
Total Posts 160
mojoPortal Community Expert
Designer of over 25 unique and custom mojoPortal sites with DMSQD and sister company, The Design Loft - www.dmsqd.com

Re: FCK editor styling issue

Hi Joe

That is a huge help, thanks so much for explaining it. I'll rework the stylesheet and incorporate awhat you've said - keep you posted!

Once again, very many thanks.

Mark

10/28/2009 2:02:54 PM
Gravatar
Total Posts 160
mojoPortal Community Expert
Designer of over 25 unique and custom mojoPortal sites with DMSQD and sister company, The Design Loft - www.dmsqd.com

Re: FCK editor styling issue

Hi Joe(s)

I reworked the style sheet and applied the styles at a higher level (p instead of #id .class p) and it's all working great.

Thank you again for your advice.

Regards

Mark

You must sign in to post in the forums. This thread is closed to new posts.