Start your free trial now, and begin learning software, business and creative skills—anytime, anywhere—with video instruction from recognized industry experts.

Start Your Free Trial Now

Styling Spry accordion panels


From:

Layouts with CSS in Dreamweaver

with Joseph Lowery

Video: Styling Spry accordion panels

When I first heard the term accordion panels I thought, what, they play music? Sadly, my fantasy did not come true. Instead accordion panels are a wonderful addition to the designer's layout palette that can hold a great deal of content in a concentrated space. Let me show you one example of highly stylized accordion panels. That's on this page here in the Our Services area. If you click on any of the titles each of the panels fly up with a little animation and expose the content.
please wait ...
Watch the Online Video Course Layouts with CSS in Dreamweaver
3h 33m Intermediate Aug 03, 2011

Viewers: in countries Watching now:

This course shows how to use the combined power of Dreamweaver and CSS to create compelling, easy-to-maintain web page layouts. After demonstrating how to maximize Dreamweaver's built-in layouts (including HTML5 layouts), author Joseph Lowery reviews essential layout concepts such as the box model, document flow, and the proper use of floats. Next, the course covers how to develop an array of basic 2- and 3-column layouts from the ground up, and then how to customize them with advanced features like CSS3 rounded corners, faux columns, and Spry widgets. The course concludes with a demonstration of techniques for converting a desktop layout to one better suited for tablets and smart phones.

Topics include:
  • Exploring HTML5 templates in Dreamweaver
  • Understanding document flow
  • Using floats properly
  • Resetting CSS styles
  • Creating a 1-, 2-, or 3-column layout
  • Deciding on a fixed width versus variable width design
  • Coding layouts for HTML5 and CSS 3
  • Incorporating floated elements
  • Applying the faux column technique
  • Using Spry widgets
  • Using Multiscreen Preview
  • Modifying desktop layout for tablets
  • Developing smart phone layouts
Subject:
Web
Software:
Dreamweaver
Author:
Joseph Lowery

Styling Spry accordion panels

When I first heard the term accordion panels I thought, what, they play music? Sadly, my fantasy did not come true. Instead accordion panels are a wonderful addition to the designer's layout palette that can hold a great deal of content in a concentrated space. Let me show you one example of highly stylized accordion panels. That's on this page here in the Our Services area. If you click on any of the titles each of the panels fly up with a little animation and expose the content.

When you hover over labels they change its background color and it becomes bold. These particular accordion panels are based on Adobe's Spry framework and in this video I'll show you how I styled them to fit perfectly in my site as an example of how you can integrate accordion panels into yours. So let me close out this index.htm and show you this index.htm and if you scroll down a bit you'll notice that there are no accordion panels yet installed. We're going to do that right away. So if you place your cursor right after Our Services and then select h2 we're going to move the cursor right after the h2.

Just press the Right Arrow key once so that you'll be still within the content div, but after the accordion panels. To verify this you can open up Split view if you want and there you can see that's where the cursor is right after the h2 statement. Let's go ahead go back to Design view and open up the Insert panel. We want to go to the Layout category and scroll down a little bit until you see Spry Accordion.

Click that once and this will insert the default arrangement for the spry accordion which sets up two accordion panels. I'm going to open up the Properties panel for a little bit. Scroll down here so we can still see our accordion panel. Now whenever the Spry Accordion tab is selected up here the bright Blue one that you see, the Property Inspector will show all the properties available to you for the Accordion panel. Now one of the things we can do is add additional panels, and if you'll recall I had a good number of them available in the completed example 06 and all.

So let's go ahead and hit the plus button a number of times. So there is Label 3, 4, 5, and 6. In this example I'm not going to change any of the labels or bring in any content we're just going to concentrate right on the styling. Now I'm going to Save the page and watch what happens. Dreamweaver will bring up a dialog box to let you know that it has some dependent files that it needs to bring into the site and it's going to bring them in and put them in the site root in a folder called SpryAssets.

So I'll click OK and I'm going to open up the Files panel a little bit just to show it to you. Now let me close the CSS Style to give us some more room and there you can see in the root of my folder is the SpryAssets folder and within that is SpryAccordion.css and SpryAccordion.js.

Let's prepare for the next couple of steps by opening up the CSS Styles panel completely. Now depending on the level of customization that you have to do to adapt your spry widgets to your site you can either go in and make modifications to the SpryAccordion.css page that we see here and that's listed in the CSS Styles panel in the All mode, or you can create your own spry CSS file. When there are a lot of changes to be made I like to pick the secondary route, because it allows me to keep my styles completely separate if I want to use the default setup in another location on the site.

So to do that what I'm going to do is go into SpryAccordion.css choose Command+A on the Mac, or Ctrl+A on the PC in order to select everything and then copy it with a Command+C or Ctrl+C. And now I'm going to create a new CSS file by going to File>New and choose Blank Page and the Page Type this time will be CSS and I'll just click Create.

And once that opens up I'll go ahead and use Command+V to paste in everything that I copied and let's Save this as a new CSS file and this time I'm going to keep it in the Chapter 4>04_04 folder. There is a styles folder there and I'm going to call it mySpryAcc for accordion. Save that.

Now the next step is to go to the source code for our page and we'll link in our newly created files. So if you go down to the bottom of the CSS Styles panel the first button that you see there in the group on the right is Attach Style Sheet. It looks like a couple of pieces of chain for linking. Then once the Attach External Style Sheet dialog box opens click Browse and you want to navigate to the Chapter 4>04_04 folder find the styles folder and then select mySpryAcc.css.

Click Choose and then click OK. Now let me go to Code, because it's important that this particular stylesheet is linked after the one that Dreamweaver automatically inserted. So I'm going to go up to where the body tag starts and the head stops and the first thing that we see here is the script tag linking to the JavaScript file for SpryAccordion followed by the CSS file for SpryAccordion and then finally mySpryAcc.css which at the moment is an exact duplicate of the SpryAccordion.css.

Perfect! So I'm going to go ahead and save this configuration and now let's go back out to Design view and start making some changes. So we can bring in the default accordion panel into something that works well with this site. In All we're going to change eight out of the nine rules that are available to us in the Spry Accordion panel. I'll show you exactly what changes to make in the next movie.

There are currently no FAQs about Layouts with CSS in Dreamweaver.

 
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

* Estimated file size

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Layouts with CSS in Dreamweaver.

Return to your organization's learning portal to continue training, or close this page.


OK

Upgrade to View Courses Offline

login

With our new Desktop App, Annual Premium Members can download courses for Internet-free viewing.

Upgrade Now

After upgrading, download Desktop App Here.

Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Start your FREE 10-day trial

Begin learning software, business, and creative skills—anytime,
anywhere—with video instruction from recognized industry experts.
lynda.com provides
Unlimited access to over 4,000 courses—more than 100,000 video tutorials
Expert-led instruction
On-the-go learning. Watch from your computer, tablet, or mobile device. Switch back and forth as you choose.
Start Your FREE Trial Now
 

A trusted source for knowledge.

 

We provide training to more than 4 million people, and our members tell us that lynda.com helps them stay ahead of software updates, pick up brand-new skills, switch careers, land promotions, and explore new hobbies. What can we help you do?

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.