2011-11-08, 08:50:28
charles_i Wrote:In template.php you are supposed to add id='content' to the body tag and/or to here:
Code:<div id="content"><?php get_page_content(); ?></div>
and/or possibly here as well:
Code:<div id="content" class="<?php echo return_page_slug(); ?>"></div>
That corresponds to your css file where the instructions are to use this for the editor:
Code:body#content { /* for the editor */ }
but conflictingly it says also to use this for the editor (as well as the site):
Code:#content p { /* for site and editor */ }
and then this for content outside of content - but why would you have any content that does not fall within the content of your site?
}Code:.motto1 { /* without #content */
I try to make this clear:
- In my template I mark my content part with id content thus all rules are like #content ... { ... }.
- In order to be able to use these rules in the editor, I have to add this id to the surrounding element of the editor's content, thus the setting bodyId: 'content'
- In my template I have some settings like a large left margin, which would make the editor unusable (well, I would have to scroll horizontally a lot), thus I add rules to correct this: body#content ... { }. These rules only match for the editor, but not my style sheet and they have a longer selector and thus take precedence to the other rules.
- Additionally I have rules for special classes like motto1, which I want to be selectable in the styles dropdown. However, to display the style as WYSIWYG in the dropdown, you have to specify a simple rule, thus all styles which should be selectable in the dropdown do not have the #content prefix, but are just .myclass { ... }. This is no problem for me, as I only use these classes within the content.
(Of course you can use a different id, this is just an example)
Hope this helps.