This entry was posted on Monday, March 31st, 2008 at 2:35 am and is filed under Dreamweaver, Website Development. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Adobe Evangelists of Central PA
Central PA Multimedia Users Blog
Adobe Spry Tabbed Panels meets Sliding Door and CSS Sprites
So you like the functionality of the Adobe Spry Tabbed Panels, but their drab appearance doesn’t go well with the overall design of your Web site. Meanwhile, you have been hoping that Adobe would eventually give you the ability to change their appearance with little or no CSS experience. Perhaps I have the solution you have been hoping to find and use on your Web site using the Sliding Door and CSS Sprites technique.
I would recommend using Macromedia Dreamweaver 8 or Adobe Dreamweaver CS3 (or better) with the Spry Framework widget already installed. If you don’t have Spry preinstalled in Dreamweaver, go to it’s homepage and download the extension…
http://labs.adobe.com/technologies/spry/home.html
After it is installed, try adding a Spry Tabbed Panels widget on one of your Web pages. The widget will automatically embed code into your HTML as well as create a javascript (SpryTabbedPanels.js) and CSS (SpryTabbedPanels.css) file. Besides the embedded HTML code, javascript and CSS file, you will need to create, or edit, a GIF (spryTabbedPanels.gif) file that would work well with the overall design of your Web site. Place this GIF file in the images folder on the root of your Web site (example: /images/spryTabbedPanels.gif).
You will need to add some additional HTML to your Spry Tabbed Panels unordered list.
Find the following HTML…
<ul class=”TabbedPanelsTabGroup”>
<li class=”TabbedPanelsTab” tabindex=”0″>Tab 1</li>
<li class=”TabbedPanelsTab” tabindex=”0″>Tab 2</li>
</ul>
Add a hyperlink around both Tab 1 and Tab 2. I would also recommend sequentially numbering the tabindex as illustrated below…
<ul class=”TabbedPanelsTabGroup”>
<li class=”TabbedPanelsTab” tabindex=”0″><a href=”#Tab1″>Tab 1</a></li>
<li class=”TabbedPanelsTab” tabindex=”1″><a href=”#Tab1″>Tab 2</a></li>
</ul>
Open the SpryTabbedPanels.css and go to the very bottom of the page in Dreamweaver’s code view. Copy and paste the following beneath all of the original CSS…
/* BEGIN: Spry Horizontal Tabbed Panels meets Sliding Door and CSS Sprites */
/* Revision by Craig Malcolm Petrou of cpetrou.com */
.TabbedPanels {
margin: 0 5px 20px 0;
width: 570px;
}
.TabbedPanelsContent {
background-position: bottom;
padding: 9px;
}
.TabbedPanelsContentGroup {
background-color: #FFF;
border: 1px solid #4E4087;
}
.TabbedPanelsTab {
background-color: #FFF;
border: solid 0 #FFF;
font: bold 90% “Trebuchet MS”, Trebuchet, Verdana, Arial, Helvetica, sans-serif;
text-align: center;
height: 30px;
}
.TabbedPanelsTabHover {
background-color: #FFF;
}
.TabbedPanelsTabSelected {
background-color: #FFF;
}
ul.TabbedPanelsTabGroup a {
display: block;
}
ul.TabbedPanelsTabGroup li.TabbedPanelsTab {
background: url(/images/spryTabbedPanels.gif) no-repeat 0 0;
margin: 0 0 0 -1px;
padding: 0 0 0 10px;
}
ul.TabbedPanelsTabGroup li.TabbedPanelsTab a {
background: url(/images/spryTabbedPanels.gif) no-repeat 100% 0;
padding: 7px 10px 5px 0;
}
ul.TabbedPanelsTabGroup li.TabbedPanelsTabSelected {
background: url(/images/spryTabbedPanels.gif) no-repeat 0 -31px;
}
ul.TabbedPanelsTabGroup li.TabbedPanelsTabSelected a {
background: url(/images/spryTabbedPanels.gif) no-repeat 100% -31px;
}
/* END: Spry Horizontal Tabbed Panels meets Sliding Door and CSS Sprites */
Examples of sites using this updated Adobe Spry Tabbed Panels code include…
Craig Petrou is a Webmaster for Pennsylvania’s largest credit union, PSECU; owner of cpetrou a Harrisburg, Pennsylvania, based advertising and marketing agency focused on web, print and multimedia; and Marketing Director for Tap ‘n Arts Dance Studio.
Leave a Reply














