Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • atze187 160 posts 215 karma points
    Mar 31, 2010 @ 15:54
    atze187
    0

    Rich text editor and em-values for font size

    Hi,

    I stumbled across problems when using em as unit for font-size values in editor-enabled css classes that show up in the "Format" dropdown list). In my case text is very small which (in my opinion) is caused by the font-size of the umbraco panels that surround the editor. Are there any known solutions to this?

    André

  • Jan Skovgaard 11245 posts 23441 karma points MVP 6x admin c-trib
    Mar 31, 2010 @ 18:18
    Jan Skovgaard
    0

    Hi André

    I'm not 100% sure but when you are using ems it can happen that the font-size decreases because of some multiplying (done by the browser) that returns a font-size that is smaller than you intended it to be.

    I think that when using editor-enabled CSS that you should stick to using absolute sizes.

    /Jan

  • Douglas Robar 3569 posts 4669 karma points MVP 6x admin c-trib
    Mar 31, 2010 @ 18:29
    Douglas Robar
    1

    I tend to add a special css file for the richtext editor to apply overrides to clear a background image or that sort of thing. You could probably set the font-size starting point as well I should think, though I've not tried it.

    Here's an example of how I target the RTE...

    /* USED ONLY BY THE TINYMCE RICHTEXT EDITOR; NOT USED ON THE SITE ITSELF */

    html {
    background: none !important;
    }
    .mceContentBody,
    .mceEditorIframe {
    background-color: #FFFFFF;
    background-image: none;
    margin-bottom: 0;
    }

    cheers,
    doug.

  • atze187 160 posts 215 karma points
    Apr 01, 2010 @ 08:13
    atze187
    0

    Thanks Doug, that requires me to sync between editor-only stylesheet on one hand and site stylesheet on the other hand, but that shouldn't come in too often.

  • Douglas Robar 3569 posts 4669 karma points MVP 6x admin c-trib
    Apr 01, 2010 @ 20:29
    Douglas Robar
    0

    You can certainly include any of the .mceContentBody, .mceEditorIframe {} items right in your main css. I'm a bit of a perfectionist so I like to keep them separate but its only a few extra bytes to download if you include them in your main css file so no real harm done by using just one css file for everything.

    cheers,
    doug.

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Apr 01, 2010 @ 21:46
    Peter Dijksterhuis
    0

    Saved my day today Doug :)

Please Sign in or register to post replies

Write your reply to:

Draft