This is a migrated thread and some comments may be shown as answers.

Preview Content is centered

5 Answers 105 Views
Editor
This is a migrated thread and some comments may be shown as answers.
John Snyder
Top achievements
Rank 1
John Snyder asked on 10 Jan 2008, 03:08 PM
I have an editor in my page and the contents of the editor (in edit mode and preview mode) are centered by default.  I don't want this.  The editor is in a table and nothing else in the cell is centered.  I have attempted to put various tags around the editor to get everything left aligned but nothing seems to work.

I managed to get the edit mode left aligned by creating a ContentAreaCssFile and specifying the text alignment.  However, the preview is still aligned centered instead of left aligned. 

Any workarounds for this?

5 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 11 Jan 2008, 01:57 PM
Hi Dustin,

I tried to reproduce the issue on my side but to not avail. Could you open a support ticket and send us a sample project reproducing the behavior?

Once we have the project on our side we will do all our best to provide you with a solution as soon as possible.



Kind regards,
George
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
N
Top achievements
Rank 1
answered on 16 Jan 2008, 10:34 AM
I have exactly the same issue with Prometheus Editor version 2007.3.1216.35. Has it been resolved?
0
Rumen
Telerik team
answered on 16 Jan 2008, 10:46 AM
Hi Nuri,

Is it possible to open a support ticket and send a sample working project that demonstrates the alignment problem? Please, include a screenshot of the observed behavior too. We are still unable to reproduce this problem and we will need your assistance.

Once we are able to reproduce the problem on our side, we will do our best to provide a working solution.


Looking forward to hearing from you soon,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
N
Top achievements
Rank 1
answered on 16 Jan 2008, 11:25 AM
I was just creating a project for you and I found the cause (at least in my case). If you use a theme and have the following in your CSS file the editor centers the content: body { text-align: center }

This is how to reproduce the problem:

  • create a new project
  • add a web.config and set the styleSheetTheme attribute:

<pages styleSheetTheme="Blue" enableEventValidation="false">

    • add an  App_Themes folder and then create a new theme folder called Blue
    • Inside The "Blue" folder , create styles.css
    • Add  the following CSS rule inside styles.css

       body { text-align: center }

    • create a new master page with a single content area and nothing else
    • create a new default.aspx page that uses the master page
    • add this editor inside the asp:content control in your default.aspx:

    <telerik:RadEditor ID="Editor1" runat="server" Skin="WebBlue" SkinID="DefaultSetOfTools" Width="802px" Height="540px">

    <Content>

    <h3>Support</h3>

    <p>If you have questions about operating your product, please check our <a href=http://backstage...>Knowledge Base</a> for answers to the most common questions.</p>

    <strong>Support Documents</strong><br />

    </Content>

    </telerik:RadEditor>

    That's it. Run default.aspx page and you should see the centering.

    The editor works fine if you remove the CSS rule:   body { text-align: center }

    Cheers,
    Nuri






     

     

    0
    Rumen
    Telerik team
    answered on 17 Jan 2008, 08:29 AM
    Hi Nuri,

    You can easily fix the problem by setting the CssFiles property to point to your external css file. Thus the editor will not copy the page styles and will read only the styles from the external css file, e.g.

    <telerik:radeditor runat="server" ID="RadEditor1">
       
    <CssFiles>
           
    <telerik:EditorCssFile Value="~/ExternalCssFiles/Styles1.css" />
       
    </CssFiles>
    </
    telerik:radeditor>

    C#
    RadEditor1.CssFiles.Add("~/ExternalCssFiles/Styles1.css");


    VB.NET
    RadEditor1.CssFiles.Add("~/ExternalCssFiles/Styles1.css")

    In the Styles1.css file put your own css class that does not contain body { text-align: center } or keep the file empty. This should do the trick.

    Best regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
    Tags
    Editor
    Asked by
    John Snyder
    Top achievements
    Rank 1
    Answers by
    George
    Telerik team
    N
    Top achievements
    Rank 1
    Rumen
    Telerik team
    Share this question
    or