Vertical Centering Text

2 posts, 0 answers
  1. Jeff
    Jeff avatar
    6 posts
    Member since:
    Mar 2014

    Posted 25 Jun 2014 Link to this post

    Is there a way to vertically center text inside the RadEditor window? Setting "vertical-align:middle" in the editor's CSS file doesn't seem to work.
  2. Ianko
    Ianko avatar
    1507 posts

    Posted 26 Jun 2014 Link to this post

    Hello Jeffrey,

    The required behavior should be build according the use case scenario.

    Basically text cannot be vertically aligned with this CSS attribute directly. You can rather use the line-height attribute, although this would work only for text in one line. Further you can use the display: table approach and the vertical-align:middle attribute. I suggest following this Stackoverflow thread in which different approach for vertical alignment are discussed. Note that the content area of the RadEditor is a simple iframe and the editable area is a BODY element when the ContentAreaMode is Iframe. When ContentAreaMode="Div" the content is in a plain editable DIV element.

    I suggest finding a proper approach to style simple text without the RadEditor control and then integrate it. If you have further difficulties on handling the desired custom solution with the Editor please get back to me with the detail about the encountered difficulties.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft R3 2016 release webinar banner
Back to Top