Copied to clipboard

Flag this post as spam?

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


  • Sandro 45 posts 118 karma points c-trib
    Aug 21, 2009 @ 09:00
    Sandro
    0

    Richtext editor content is centered after assigning related stylesheet

    Good morning everybody :)

    I modified the richtext editor data type and assigned a related stylesheet (the main.css of my website). Now, if I want to edit a text in a node which uses the richtext editor data type, the whole content is centered in the editor. I created a editor.css and assigned it also with the richtext editor data type. I tried things like

    p {
        text-align: left;
    }

    or

    * {
        text-align: left;
    }

    but it doesn't help. What is the trick?

  • dandrayne 1138 posts 2262 karma points
    Aug 21, 2009 @ 10:06
    dandrayne
    101

    If you use firebug you could probably see what rules are causing the text-alignment to be centered, but I'd never recommend attaching your main stylesheet to the editor.  Instead make a new sheet just for the editor with a few rules like "image align left", "image align right", "heading" etc.

     

  • Sandro 45 posts 118 karma points c-trib
    Aug 21, 2009 @ 13:07
    Sandro
    0

    Your suggestion will end up in redundancy. Because we need to define the Styles twice. But Firebug brought me to define

    html, body, p {
        text-align:left;
    }

    in editor.css. This works perfect for me.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies