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

firefox selected button

1 Answer 34 Views
Editor
This is a migrated thread and some comments may be shown as answers.
jonathan
Top achievements
Rank 1
jonathan asked on 12 Jan 2009, 07:40 AM

Hi all,

I want to change the backcolor of the buttons whenever it is selected,
like the behaviour here when I'm trying to create a new thread.

when i select the bold or italics, the selected color would be color blue.

 

i seem to have found out that when selecting an item, there is a class named rade_tool_selected, but when i try to do this:

<style type="text/css">

myclass .rade_tool .rade_tool_selected
{

    background-color:blue;

}

</style>

this doesn't seem to work, please help me.

thanks,
regards,
jonathan

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 15 Jan 2009, 05:51 AM
Hello Jonathan,

There are a few important points that you should consider prior to doing this:

1. The styles of RadEditor are heavier than your custom styles, so to override them you have to force their properties with the !important flag of CSS.
2. You don't really need myclass, and if you did, you should have prefixed it with a dot, i.e - .myclass.
3. The class that marks a button as selected is appended to the existing class of the button, i.e:

<a class="rade_tool rade_tool_selected"></a>

... so in your CSS these two should not have space in between, i.e - this is a composite class - .rade_tool .rade_tool_selected.
4. You will probably also need to remove the background image of the selected button in order to set the background color visible - background-image: none !important;

In order to put things to work, please, use the following selector and add your custom properties:

<style type="text/css">
.rade_tool.rade_tool_selected
{
    background-color: blue !important;
    background-image: none !important;
}
</style>


... or simply combine the two properties:

<style type="text/css">
.rade_tool.rade_tool_selected
{
    background: blue none !important;
}
</style>


Greetings,

Martin Ivanov
the Telerik team

 


Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
jonathan
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or