Web Design Training courses, videos & tutorials at DigitalFamily.com
Web design & Internet trends
books, videos, training & consulting
  • Home
  • Store
    • Web Design Books
    • Dreamweaver Videos
    • Expression Web Videos
    • Products
    • Shopping Cart
    • Order Status
  • Consulting Services
  • Web Tutorials
    • Web Design 101
    • Mobile and Responsive Web Design
    • Social Media
    • Online Reputation
    • Dreamweaver
    • Expression Web
    • Cascading Style Sheets
    • WordPress
  • Dreamweaver
    • CS6 Tutorials
    • CS5 Tutorials
    • CS4 Tutorials
    • CS3 Tutorials
  • FAQ
    • Dreamweaver
    • CSS
    • Graphics
    • WordPress
    • Ask the Author
  • About Us
    • About DigitalFamily.com
    • About Janine Warner
  • Contact
Search the site...
Home» Tutorials » CSS » Creating Collapsible Panels with Spry in Dreamweaver

Creating Collapsible Panels with Spry in Dreamweaver

Posted by Janine Warner - August 25, 2012 - CSS, Dreamweaver, Dreamweaver CS3, Dreamweaver CS4, Dreamweaver CS5, Dreamweaver CS6, Tutorials
0

STEP 9 Change Menu Display OptionsUsing the Spry features in Dreamweaver, you can create drop-down menus, collapsible panels, and other advanced features.

You’ll find the insert options in a Spry Insert bar at the top of the work area, and editing options in the Properties inspector at the bottom of the workspace.

This tutorial shows you how to create a Collapsible Panel with Spry, an interactive feature that enables visitors to your site to open and close panels to display more or less information without reloading the page.

STEP 1 Spry Collapsible Panels in Action

You can add as many Spry collapsible panels to a Web page as you like and visitors can open and close them independently. In the page shown here in the Firefox Web browser, there are four collapsible panels, two are open and two are closed. To test these and other Spry features, you have to preview your pages in a browser that supports CSS and Javascript. (Read on for detailed instructioins below.)

Spry Menu design

(Photos by Jasper Johal, www.jasperphoto.com)

STEP 2 Set Up Your Site

You can add a Spry menu to a new or existing page, but like most of the features in Dreamweaver, things works better when you’ve first defined your Web site in Dreamweaver. If you’ve already gone through the site setup process, you’re ready for step two. If you’re creating a new site, choose Site > New Site, select the Advanced tab  and fill in the fields in the Local Info category. For more detailed instructions, read the online tutorial Defining a Site in Dreamweaver.

Step 2 Set Up Your Site

STEP 3 Create a New Page or Open an Existing One

To create a new page, choose File > New and then select a file type. In the New Document Window, you can choose from a variety of file types, including ASP, PHP, and CFM. If you’re creating a new page for a basic, static Web site, choose Blank Page, HTML, and then select a CSS Layout or choose None to create a completely blank page. If you choose one of the CSS Layouts, you can alter the layout to better suit your design by editing the CSS definitions. (You’ll find tips for editing CSS layouts like this one the Dreamweaver tutorial in the last issue of Layers Magazine.)

STEP 3 Create a New Page or Open an Existing One

STEP 4 Insert Spry Collapsible Panel

To insert a Spry Collapsible Panel, first open the Spry Insert Bar at the top of the workspace by clicking on the Spry Tab, or choosing Spry from the Insert Bar drop-down list. Place your cursor where you want to create the panel in your Web page, and then click on the Spry Collapsible Panel icon at the far right of the Insert bar.

STEP 4 Insert Spry Collapsible Panel

STEP 5 Add Content to Panel and Tab

When you insert a Spry Collapsible Panel, a two-section panel is added to the page. The top section is labeled Tab, the bottom section, Content. The Tab area is what a user will click on to open or close the bottom section. You can replace the word Tab with any text you want by selecting it and typing new text in its place. Similarly, you can replace the word content with your own text, images, and other elements.

STEP 5 Add Content to Panel and Tab

STEP 6 Edit Style Definitions

The format of the text in a Spry Collapsible Menu is controlled by CSS. Thus, to alter the appearance, you need to edit the CSS definitions. For example, to made the text in the tab area bigger or bolder, you could double click on the style named: .CollapsiblePanelTab in the CSS Panel and in the CSS Definition dialog, use the settings in the Type category to specify the font face, size, and style.

STEP 6 Edit Style Definitions

STEP 7 Add Additional Panels

To add more Collapsible Panels to the same page, repeat steps 4 – 6. Each time you add a Collapsible Panel, Dreamweaver automatically inserts the corresponding code in the HTML page and names the panel in the order it was created, CollapsiblePanel1, CollapsiblePanel2, etc. However, only one set of CSS styles are added to the page for all of the panels. If you want to alter the display of the panels so that they are not the same in appearance, you’ll need to create new styles using the panel name to target the id of the Div that surrounds the panel.

STEP 7 Add Additional Panels

STEP 8 Preview in a Browser to Test

To test a Spry feature, like a Collapsible Menu, you’ll need to preview your page in a Web browser, such as Safari or Firefox. Click on the tab at the top of the Collapsible Panel to close it, click again to open it.

STEP 8 Preview in a Browser to Test

STEP 9 Change Menu Display Options

You can change the basic panel settings by altering the options in the Property inspector. To do so, you need to select the blue tab at the top left of the Collapsible Panel in Dreamweaver to display the settings in the Property Inspector. These settings are specific to each panel and are edited indendently.

STEP 9 Change Menu Display Options

Originally written for Layers Magazine, June, 2007

css, dwcs3, dwcs4, dwcs5, dwcs6

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Share with your friends

Recent Posts

  • How to change the width in a Dreamweaver drop-down menu created with a Spry Widget
  • Should I use a higher image resolution than 72 ppi for my photographs on the web?
  • How do I move my domain name?

Dreamweaver Tutorials

  • Creating websites with Dreamweaver HTML templates (.dwt)
  • What’s the difference between a website & blog?
  • 6 Reasons to Upgrade to Dreamweaver CS6
  • Tracking web traffic: Google Analytics vs other traffic counters
  • Creating Responsive Designs with Dreamweaver CS6 Fluid Grid Layout

Popular books & videos

  • Dreamweaver CS6 Video

    DW-Video-250
    Creating Responsive Designs for small and large screens with Fluid Grid Layouts
    Discover how to create web designs that look great on large and small screens. From smartphones to tablets to desktops, the new Fluid Grid Layout in version CS6 makes it easier than ever to set up media queries and design websites with HTML5 and CSS3. More Info »
    $49.99$39.99

    View Cart / Checkout
  • CSS Basics: A Refreshing Way to Learn Cascading Style Sheets

    CSS-Basics-DVD
    Training video DVD
    Whether you are completely new to designing with Cascading Style Sheets, or you really want to master the basics of CSS, Janine's crash course will get you up to speed quickly. More Info »
    $24.99

    View Cart / Checkout
  • Creating CSS Layouts: Getting More Advanced with Cascading Style Sheets

    CSS-Advanced-DVD-500
    Training Video DVD
    Dive deep and learn more advanced techniques with Cascading Style Sheets in Part 2 of Janine's CSS training series. More Info »
    $24.99

    View Cart / Checkout
© 2001 - 2013 All rights reserved. DigitalFamiliy.com was created by Janine Warner | Terms & Conditions of Use | Privacy Policy
  • Home
  • Store
  • Consulting Services
  • Web Tutorials
  • Dreamweaver
  • FAQ
  • About Us
  • Contact