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

Separator Line Height

9 Answers 143 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
snissim
Top achievements
Rank 1
snissim asked on 01 Oct 2008, 04:35 PM
Hi,

Is it possible to set the line height for rows that are marked as separators?
Separator rows have the same height as other rows, but I would like to reduce them if possible.

I have tried altering the css file by adding a height to rcbseparator - but this had no effect.  The combobox is being used for both Template and Non-Template dropdowns.

Thanks
Shimon

9 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 01 Oct 2008, 04:59 PM
Hello snissim,

Please try this:

.rcbSeparator

{
height:4px !important;
line-height:4px !important;
}

Regards,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
snissim
Top achievements
Rank 1
answered on 01 Oct 2008, 05:33 PM
Albert,

Thanks for the quick response, but unfortunately the line height still remains the same.

.RadComboBoxDropDown_WebBlue .rcbSeparator  
{  
    color: #222;  
    background: #F4F4F4;  
    height:4px !important;  
    line-height:4px !important;  

I changed the background colour as a test and this was picked up OK - just not any height changes.

Thanks
Shimon
0
Yana
Telerik team
answered on 02 Oct 2008, 10:46 AM
Hello Shimon,

Please try the following css styles and tell us how it goes:

<style type="text/css">  
    .RadComboBoxDropDown_WebBlue .rcbSeparator     
    {        
        background-colorred !important;    
        padding: 0 !important;  
        height:4px !important;     
        line-height:4px !important;     
        font-size0px !important;  
    }    
</style> 

Kind regards,
Yana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
snissim
Top achievements
Rank 1
answered on 02 Oct 2008, 11:50 AM
Yana,

Many thanks.  That worked brilliantly.

We had just found a workaround:  height/line-height were being ignored only when the item had no text e.g. a separator line, so we just added text to the item and set the font colour to match the background colour and removed all padding.

Your solution is a lot more elegant and is now implemented.

Thanks again
Shimon
0
Yana
Telerik team
answered on 02 Oct 2008, 11:52 AM
Hello Shimon,

I am glad I could help.

All the best,
Yana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 18 Oct 2011, 03:22 PM
This solution appears to only work in firefox (I use version 7)... and not in IE8. I have the following style declaration:

.rcbSeparator
        {
            background: black !important;
            height:1px !important;
            min-height: 1px !important;
            padding:0px !important;
            margin:0px !important;            
        }

I have attached what the result looks like in firefox 7 (ff.jpg) and IE8 (ie8.jpg)
0
Kate
Telerik team
answered on 20 Oct 2011, 04:15 PM
Hello Albert,

To set the height of an item that is a separator in IE7 you could use the following css class selector:
* + html div.RadComboBoxDropDown .rcbSeparator     {     height1px; }

Regards,
Kate
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
0
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
answered on 24 Oct 2011, 09:51 PM
I tried adding the class selector.. still no help in my scenario in ie8. I took a look at a stripped out example and it seemd to be fine in ie8 even without your added class selector. Any idea why the .rcbSeparator Selector wouldn't work in my case in IE8? I would think the !important declarations would make sure the style is not being overridden anywhere else.
0
Kate
Telerik team
answered on 28 Oct 2011, 08:45 AM
Hello Albert,

Indeed, using !important means that the style gets the highest specificity and not other could overwrite it. The code snippet that I previously sent you should work in IE7. However, you can try to use the following css class to achieve the desired appearance. I also attached a runnable page that demonstrated how they work.
<style type="text/css">
        /*Works in IE7  */
        * + html div.RadComboBoxDropDown li.rcbSeparator
        {
            height: 1px !important;
            min-height: 1px !important;
        }
         
        /*Works for  IE8    */
        html div.RadComboBoxDropDown li.rcbSeparator
        {
            min-height: 1px !important;
        }
    </style>
 

Best wishes,
Kate
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
Tags
ComboBox
Asked by
snissim
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
snissim
Top achievements
Rank 1
Yana
Telerik team
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Kate
Telerik team
Share this question
or