Spry tabbed panels

In this tutorial i will talk about spry tabbed panels .

Here are some links that are recommended if you want to learn spry tabbed panels.

http://kb2.adobe.com/community/publishing/504/cpsid_50437.html

http://www.ehow.com/how_2255175_dreamweaver-cs-spry-tabbed-panels.html

Note:Spry objects are in dreamweaver version cs3 or higher

So i will show you how you can create and modify tabbed panel.

Go to insert> sry > spry tabbed panel

Now it will be inserted.

You can add content for both the tabs . First enter the content for the first tab which is selected be default.

To go to the second tab click on second tab . Now you will se an eye image click on it and you will see the content area for the second tab.

Now that default look looks awful with css you can modify the tabbed panel.

First of all select sprypanel.css file in css styles tab .

Now search for the rule TabbedpanelTab and you can change the background-color property . This will change the background-color of the tabs but note there are some more rules too so you may need to override them so it is recommended you see all the rules like

.Tabbedpaneltabselected

.TabbedpanelTaba

And many more . And also adjust the padding if you want to change the size of the tab you can ajust padding property.

You can alos change the default hover background-color of the hover rule . This can make your tabbed panel look awesome.

You can add an background-image to the content area of tabbed panel .

Here is the css file of that tabbed panel

@charset "UTF-8";

/* SpryTabbedPanels.css – version 0.6 – Spry Pre-Release 1.6.1 */

/* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */

/* Horizontal Tabbed Panels
 *
 * The default style for a TabbedPanels widget places all tab buttons
 * (left aligned) above the content panel.
 */

/* This is the selector for the main TabbedPanels container. For our
 * default style, this container does not contribute anything visually,
 * but it is floated left to make sure that any floating or clearing done
 * with any of its child elements are contained completely within the
 * TabbedPanels container, to minimize any impact or undesireable
 * interaction with other floated elements on the page that may be used
 * for layout.
 *
 * If you want to constrain the width of the TabbedPanels widget, set a
 * width on the TabbedPanels container. By default, the TabbedPanels widget
 * expands horizontally to fill up available space.
 *
 * The name of the class ("TabbedPanels") used in this selector is not
 * necessary to make the widget function. You can use any class name you
 * want to style the TabbedPanels container.
 */
.TabbedPanels {
 overflow: hidden;
 margin: 0px;
 padding: 0px;
 clear: none;
 width: 100%; /* IE Hack to force proper layout when preceded by a paragraph. (hasLayout Bug)*/
 background-color: #666;
}

/* This is the selector for the TabGroup. The TabGroup container houses
 * all of the tab buttons for each tabbed panel in the widget. This container
 * does not contribute anything visually to the look of the widget for our
 * default style.
 *
 * The name of the class ("TabbedPanelsTabGroup") used in this selector is not
 * necessary to make the widget function. You can use any class name you
 * want to style the TabGroup container.
 */
.TabbedPanelsTabGroup {
 margin: 0px;
 padding: 0px;
}

/* This is the selector for the TabbedPanelsTab. This container houses
 * the title for the panel. This is also the tab "button" that the user clicks
 * on to activate the corresponding content panel so that it appears on top
 * of the other tabbed panels contained in the widget.
 *
 * For our default style, each tab is positioned relatively 1 pixel down from
 * where it wold normally render. This allows each tab to overlap the content
 * panel that renders below it. Each tab is rendered with a 1 pixel bottom
 * border that has a color that matches the top border of the current content
 * panel. This gives the appearance that the tab is being drawn behind the
 * content panel.
 *
 * The name of the class ("TabbedPanelsTab") used in this selector is not
 * necessary to make the widget function. You can use any class name you want
 * to style this tab container.
 */
.TabbedPanelsTab {
 position: relative;
 top: 1px;
 float: left;
 padding: 20px;
 ;
 margin: 10px;
 font: bold 0.7em sans-serif;
 background-color: #333;
 list-style: none;
 border-left: solid 1px #CCC;
 border-bottom: solid 1px #999;
 border-top: solid 1px #999;
 border-right: solid 1px #999;
 -moz-user-select: none;
 -khtml-user-select: none;
 cursor: pointer;
 color: white;
 padding-right: 20px;
}

/* This selector is an example of how to change the appearnce of a tab button
 * container as the mouse enters it. The class "TabbedPanelsTabHover" is
 * programatically added and removed from the tab element as the mouse enters
 * and exits the container.
 */
.TabbedPanelsTabHover {
 background-color: #F00;
}

/* This selector is an example of how to change the appearance of a tab button
 * container after the user has clicked on it to activate a content panel.
 * The class "TabbedPanelsTabSelected" is programatically added and removed
 * from the tab element as the user clicks on the tab button containers in
 * the widget.
 *
 * As mentioned above, for our default style, tab buttons are positioned
 * 1 pixel down from where it would normally render. When the tab button is
 * selected, we change its bottom border to match the background color of the
 * content panel so that it looks like the tab is part of the content panel.
 */
.TabbedPanelsTabSelected {
 background-color: #000;
 border-bottom: 1px solid #EEE;
 color: #FFF;
}

/* This selector is an example of how to make a link inside of a tab button
 * look like normal text. Users may want to use links inside of a tab button
 * so that when it gets focus, the text *inside* the tab button gets a focus
 * ring around it, instead of the focus ring around the entire tab.
 */
.TabbedPanelsTab a {
 color: #666;
 text-decoration: none;
}

/* This is the selector for the ContentGroup. The ContentGroup container houses
 * all of the content panels for each tabbed panel in the widget. For our
 * default style, this container provides the background color and borders that
 * surround the content.
 *
 * The name of the class ("TabbedPanelsContentGroup") used in this selector is
 * not necessary to make the widget function. You can use any class name you
 * want to style the ContentGroup container.
 */
.TabbedPanelsContentGroup {
 clear: both;
 border-left: solid 1px #CCC;
 border-bottom: solid 1px #CCC;
 border-top: solid 1px #999;
 border-right: solid 1px #999;
 background-color: #EEE;
}

/* This is the selector for the Content panel. The Content panel holds the
 * content for a single tabbed panel. For our default style, this container
 * provides some padding, so that the content is not pushed up against the
 * widget borders.
 *
 * The name of the class ("TabbedPanelsContent") used in this selector is
 * not necessary to make the widget function. You can use any class name you
 * want to style the Content container.
 */
.TabbedPanelsContent {
 overflow: hidden;
 padding: 4px;
 background-image: url(file:///C|/Users/saurabh/Pictures/imagejpg.jpg);
 background-repeat: no-repeat;
}

/* This selector is an example of how to change the appearnce of the currently
 * active container panel. The class "TabbedPanelsContentVisible" is
 * programatically added and removed from the content element as the panel
 * is activated/deactivated.
 */
.TabbedPanelsContentVisible {
}

/* Vertical Tabbed Panels
 *
 * The following rules override some of the default rules above so that the
 * TabbedPanels widget renders with its tab buttons along the left side of
 * the currently active content panel.
 *
 * With the rules defined below, the only change that will have to be made
 * to switch a horizontal tabbed panels widget to a vertical tabbed panels
 * widget, is to use the "VTabbedPanels" class on the top-level widget
 * container element, instead of "TabbedPanels".
 */

.VTabbedPanels {
 overflow: hidden;
 zoom: 1;
}

/* This selector floats the TabGroup so that the tab buttons it contains
 * render to the left of the active content panel. A border is drawn around
 * the group container to make it look like a list container.
 */
.VTabbedPanels .TabbedPanelsTabGroup {
 float: left;
 width: 10em;
 height: 20em;
 background-color: #EEE;
 position: relative;
 border-top: solid 1px #999;
 border-right: solid 1px #999;
 border-left: solid 1px #CCC;
 border-bottom: solid 1px #CCC;
}

/* This selector disables the float property that is placed on each tab button
 * by the default TabbedPanelsTab selector rule above. It also draws a bottom
 * border for the tab. The tab button will get its left and right border from
 * the TabGroup, and its top border from the TabGroup or tab button above it.
 */
.VTabbedPanels .TabbedPanelsTab {
 float: none;
 margin: 0px;
 border-top: none;
 border-left: none;
 border-right: none;
}

/* This selector disables the float property that is placed on each tab button
 * by the default TabbedPanelsTab selector rule above. It also draws a bottom
 * border for the tab. The tab button will get its left and right border from
 * the TabGroup, and its top border from the TabGroup or tab button above it.
 */
.VTabbedPanels .TabbedPanelsTabSelected {
 background-color: #EEE;
 border-bottom: solid 1px #999;
}

/* This selector floats the content panels for the widget so that they
 * render to the right of the tabbed buttons.
 */
.VTabbedPanels .TabbedPanelsContentGroup {
 clear: none;
 float: left;
 padding: 0px;
 width: 30em;
 height: 20em;
}

/* Styles for Printing */
@media print {
.TabbedPanels {
 overflow: visible !important;
}
.TabbedPanelsContentGroup {
 display: block !important;
 overflow: visible !important;
 height: auto !important;
}
.TabbedPanelsContent {
 overflow: visible !important;
 display: block !important;
 clear:both !important;
}
.TabbedPanelsTab {
  overflow: visible !important;
  display: block !important;
  clear:both !important;
}
}
 

If you are facing any problems on this topic please use idealprogrammer forums and free feel to discuss . BTW here is my image of my modified tabbed panel