1. #1
    Ext User
    Join Date
    Apr 2008
    Posts
    118
    Vote Rating
    0
    plitvak is on a distinguished road

      0  

    Default [CLOSED] class attribute doesn't work for SPAN when used with HTML as a ToolBarItem

    [CLOSED] class attribute doesn't work for SPAN when used with HTML as a ToolBarItem


    The following code doesn't display bold text in the tool bar:

    Code:
    LayoutContainer mainContainer    = new LayoutContainer();
    
    ToolBar toolBar = new ToolBar();
    toolBar.add( new AdapterToolItem( new HTML( "Test: <span class='bold-text'>bold text</span>" ) ) );
    
    mainContainer.add( toolBar );
    Whre:
    .bold-text {
    font-weight: bold;
    }

    While if you change it to the:
    Code:
    LayoutContainer mainContainer    = new LayoutContainer();
    
    ToolBar toolBar = new ToolBar();
    toolBar.add( new AdapterToolItem( new HTML( "Test: <span style='font-weight: bold;'>bold text</span>" ) ) );
    
    mainContainer.add( toolBar );
    It works just fine.

  2. #2
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    GXT does nothing to the HTML you use. I am pretty sure you have a problem with your CSS and it not being assigned to your span element. Use firebug and inspect the element and you will see what styles are applied to the span (or in this case, what styles are not applied).

Thread Participants: 1