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

Possible to change background color of RadButton?

1 Answer 384 Views
Button
This is a migrated thread and some comments may be shown as answers.
DAVE
Top achievements
Rank 1
DAVE asked on 23 Feb 2011, 02:36 AM
I'd like to make the background fill color of RadButtons different colors from the color set by the style.  Can that be done through code at runtime?

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 23 Feb 2011, 10:15 AM
Hi Dave,

The default button in RadButton control is rendered with an anchor and input inside it. Both html elements have background images coming from a sprite image that defines their background color, and it is not possible to set different color using pure CSS. Therefore you need to create custom skin where you should edit the sprite image with the button background elements with your preferred color palette.

You may find useful the following online resources: Tutorial: Creating RadButton Custom Skin, or you could use Telerik Visual Style Builder.

In case you want to use ButtonType="LinkButton", which is rendered with a pure CSS, you could change the background color using the necessary CSS properties.

All the best,
Bojo
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Button
Asked by
DAVE
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or