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

Making text wrap in PanelBar

3 Answers 184 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Steve Newbery
Top achievements
Rank 1
Steve Newbery asked on 10 Jul 2008, 07:52 PM
Text in my panelbar doesn't wrap within one list item, using the Telerik skin. This forces the whole thing to be too wide. I can see that it is because of the "white-space" css attribute being "nowrap".

Two questions: how can I change this attribute? I want to just override the default setting, maybe by using !important?

Second, if I do change that attribute then the line height is far too big (I can test it via Developer Toolbar for example) - I don't see how to fix that.

I want wrapping and line spacing like in the Vista skin. But I want the "look" of the Telerik skin...

Can anyone help?

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 11 Jul 2008, 12:02 PM
Hi Steve,

Go through the following forum link which explains how to wrap text in PanelBar.
Text inside a panelbar

Shinu.
0
Steve Newbery
Top achievements
Rank 1
answered on 11 Jul 2008, 03:35 PM
Shinu, thanks but that thread refers to a panelbar using a template. I am not using a template, I just need to override the built-in skin's css. 

0
Alex Gyoshev
Telerik team
answered on 14 Jul 2008, 10:48 AM
Hi Steve Newbery,

In order to override the white-space property, you can use the following CSS:
div.RadPanelBar_Telerik 
    white-spacenormal !important

The line-height can be adjusted with this CSS:
/* this is for root group items */ 
div.RadPanelBar_Telerik .rpLink 
    line-height13px !important
 
/* this is for subgroup items */ 
div.RadPanelBar_Telerik .rpGroup .rpLink 
    line-height10px !important

Please take note that after changing the line height the height of the items will be changed - this can be fixed by setting padding-top and padding-bottom to the rpLinks accordingly. Also, the properties will be inherited by subgroup items, therefore they will also need some adjustments.

Sincerely yours,
Alex
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
PanelBar
Asked by
Steve Newbery
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Steve Newbery
Top achievements
Rank 1
Alex Gyoshev
Telerik team
Share this question
or