Hello, i need to create a custom skin for tabstrip control.
Can someone tell me how to do this?
1 Answer, 1 is accepted
0
Dimo
Telerik team
answered on 16 Mar 2012, 09:47 AM
Hello Marco,
Knowing the HTML elements and CSS classes that are used by the component (you can see these in the HTML source via Firebug), you can either create styling for the TabStrip from scratch, or override the existing styles. For example here is how to override:
If the native styling for the border color of the TabStrip items is determined by:
.t-state-default {
border-color: #A7BAC5;
}
You can set a custom border color with
.t-tabstrip .t-state-default {
border-color: red;
}
Afterwards, you will need to define also a hover and active border color with:
.t-tabstrip .t-state-hover {
border-color: blue;
}
.t-tabstrip .t-state-active {
border-color: green;
}
The main gradient of the TabStrip is determined by the t-header CSS class. You may want to override that styling too.
Generally, I recommend you to get familiar with the rules of CSS specificity, inheritance and cascade:
http://css.maxdesign.com.au/ - see the presentations at the bottom of the page. The information about specificity is in the third presentation, starting from slide 50. I recommend you to watch the whole first and third presentations to gain better understanding how CSS works and how conflicting styles are applied by the browser.
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 Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.