YUI Library Home

YUI Library Examples: TabView Control: Skinning TabView

TabView Control: Skinning TabView

This demonstrates how to customize the TabView skin.

Tab One Content

Tab Two Content

Tab Three Content

Customizing TabView Skin

Skinning the YUI TabView widget is done using CSS.

The stylesheet used for other TabView examples is a minified version of the tabview-core.css and tabview-skin.css files. In order to customize the TabView skin, we recommend using the raw source files as a reference.

The tabview-core.css file includes foundational styling that controls tab orientation and basic layout, including margin between tabs and padding inside of tabs. Overriding these allows you to customize TabView for your own needs. We recommend overriding these in a separate file to simplify integrating with YUI updates.

This snippet from tabview-core.css shows the selectors and style properties you will need to override in order to customize tab spacing and padding:

The tabview-skin.css file builds upon the tabview-core.css file, adding borders, color information and other skin specific styling. This snippet includes all of the styling applied to the default TabView orientation ("top"):

Configuration for This Example

You can load the necessary JavaScript and CSS for this example from Yahoo's servers. Click here to load the YUI Dependency Configurator with all of this example's dependencies preconfigured.

Copyright © 2009 Yahoo! Inc. All rights reserved.

Privacy Policy - Terms of Service - Copyright Policy - Job Openings