Word wrap a RibbonBarButton text

6 posts, 1 answers
  1. Remco
    Remco avatar
    31 posts
    Member since:
    Dec 2010

    Posted 07 Dec 2011 Link to this post

    Hello,

    Some of our RadRibbonbuttons have a text like 'Send direct e-mail'. This looks very odd in the RibbonBar, see image.
    Is there a property or workaround to Word Wrap a RibbonBarButton text?  

    Kind Regards,
    Remco
  2. Answer
    Bozhidar
    Admin
    Bozhidar avatar
    1103 posts

    Posted 07 Dec 2011 Link to this post

    Hi Remco,

    Try the following CSS rule:

    div.RadRibbonBar div.rrbButtonGroup .rrbButtonOut .rrbTextContent {
        white-space:normal
    }

    Hope this helps Regards,
    Bozhidar
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Remco
    Remco avatar
    31 posts
    Member since:
    Dec 2010

    Posted 07 Dec 2011 Link to this post

    Thanks Bozhidar,

    When I add this CSS rule to the page and set the button width, the text is nicely word wrapped. 

    Regards, Remco
  5. Thomas
    Thomas avatar
    14 posts
    Member since:
    Mar 2012

    Posted 13 Sep 2012 Link to this post

    The Button Text is wrapped, but the wrapped text in the 1st and 2nd line isn't centered. Is it possible to do that?

    Thanks.

    /Thomas
  6. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 13 Sep 2012 Link to this post

    Hi Thomas,

    Try overriding the default CSS as follows to align the text in the center.

    CSS:
    <style type="text/css">
            div.RadRibbonBar div.rrbButtonGroup .rrbButtonOut .rrbTextContent
            {
                white-space: normal !important;
                text-align:center !important;
            }
    </style>

    Hope this helps.

    Regards,
    Shinu.
  7. Thomas
    Thomas avatar
    14 posts
    Member since:
    Mar 2012

    Posted 14 Sep 2012 Link to this post

    Works perfect - thanks! :)

    /Thomas
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017