Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Adding Spry effects

From: Dreamweaver CS6 Essential Training

Video: Adding Spry effects

The default styles for SpryWidgets are typically very generic and while they're designed so that they won't exactly ruin a layout, it's doubtful you'll ever have a situation where you don't want to modify them, at least a little. Fortunately, Adobe has made that extremely easy to do. So I have the graphic-design file open here from 11_04 directory, and before we start styling our SpryWidget I want to go over the structure just a little bit. So if I click inside one of these panels, I am going to switch over to a split screen view so we can see what's going on here. You can see that each one of these panels is a div with a class of TabbedPanelsContent.

Adding Spry effects

The default styles for SpryWidgets are typically very generic and while they're designed so that they won't exactly ruin a layout, it's doubtful you'll ever have a situation where you don't want to modify them, at least a little. Fortunately, Adobe has made that extremely easy to do. So I have the graphic-design file open here from 11_04 directory, and before we start styling our SpryWidget I want to go over the structure just a little bit. So if I click inside one of these panels, I am going to switch over to a split screen view so we can see what's going on here. You can see that each one of these panels is a div with a class of TabbedPanelsContent.

Inside that is a group of them called TabbedPanelsContentGroup, and then the tabs themselves have the very aptly named TabbedPanelsTab class and then the whole thing is sort of wrapped in this TabbedPanels1 id or TabbedPanel. So it's just a series of nested div tags and lists that have specific class names applied to it. All the widgets are structured this way. So really, if you spend some time in the structure of the widget, learning the different pieces of it, and the different classes then styling it and writing your own styles for it actually becomes pretty simple.

One of the easiest things to do however is to just go ahead and take the existing styles and modify them and that's exactly what we are going to do. So in Code View I am going to switch over to SpryTabbedPanel.css. Now I know there are probably some of you out there who are designers that are not used to hand coding and you're probably saying, man, James, towards the end of this title, he just hand codes everything. Well, it is the way that I like to work, but I'm not really letting my own personal preferences come into play here. It's just that sometimes this is much faster and a lot easier and for those of you guys, I want to ease you into doing coding a little bit.

So the Visual Tools of Dreamweaver are great, and I fully expect you to use them as much as you can. I use them myself still, but where it's appropriate to hand code, you definitely want to do that, and in this case, trying to go over to the CSS Style Panel. Well, I will just show you. See that, that's what we have to edit. So figuring out exactly which one you're looking at is sometimes kind of difficult to do. So in this case we are just going to go down the list in order and modify each one that we come to, and that makes it a lot easier, because you can see all these selectors are really well commented.

So if you go into the CSS file for any of these UI Widgets, you're going to have a lot of commenting in here that tells you exactly what you're changing when you start affecting these selectors. So it just makes a lot of sense, in this case to hand code it. So the first thing I am going to do is I am going to go into TabbedPanels. The only thing I am going to do here is I am going to create a brand-new line towards the bottom of this and I am going to add a bottom margin to this of 2ems, and the reason that I'm doing that is so that our TabbedPanelsWidget and the content below it have a little bit of space. So I am just going to add a little bit to that. Now I also should mention that if you're going to do this and you're not really all that familiar with CSS, it's always a good idea to save a backup of this file, so that any edits that you make to it that might break the syntax, it's really easy just to start over again from a clean copy.

So I would advise you to always make a backup of this. Now the next thing we are going to do is we are going to keep scrolling down and I'm going to find the TabbedPanelsTab. It's the sort of really big selector and we are going to modify this one a little bit as well. So the first thing that I am going to change here is I am going to change some of the padding. I am going to change the padding to 8px and 16px. So what that's going to be is 8px top and bottom, 16px left and right. The next thing I am going to do is adjust the margin a little bit and I am going to change it from 0px,1px, 0px,0px to 0,3px, space 3px.

So whenever you have four values like this, it's top, right, bottom, and left. So what I'm doing is right of 3px and bottom of 3px and that 3px margin is going to match all the other visual elements that we've had in our site. We've had this sort of 3px space between all of them. So that just helps us stay consistent. For font, I am going to change that as well. So I am just going to highlight all of this and I am going to change this out. I am going to type in normal 1em:, so the size is going to be 1em and then for the font itself I am going to use. Bitter, Georgia, Times, and serif.

So we are using the web font that we've been using throughout the site. For background color. I want to change that as well and I am going to change that to rgb (251, 174, 44). So that's the orange color. The active tab is going to be blue and the inactive tab is going to be orange. Now I am also going to get rid of these borders. I've got the margin that's going to be controlling the spacing between them. So we don't really need those borders. I am going to get rid of that, and the final thing that I am going do is I am going to set the color on this to white, and that way we are going to be able to read the text on that orange background.

I am going to go ahead and save that and move down to my next selector. So for the TabbedPanelsTab hover, this is going to control the styling of the tabs when people are hovering over them. All we are going to do really here is change the background color of this and I am going to change it to rgb (65, 61, 62). That's that sort of dark gray that we've been using throughout the site. So again, we are really just kind of making the colors consistent with all the other things that we've been doing. I am going to keep scrolling down, until I find the TabbedPanelsTabSelected and what I want to do here is I want to change the background color again to something that's a little bit more appropriate for the site, and I am going to do rgb (2, 99, 174).

That's the blue color we've been using. I am going to remove that bottom border; where the margins control the spacing between these elements and I am going to give it a margin-bottom of 0:, and then a padding-bottom: 11 pixels. So again, the actual selected tab, that's going to have a slightly larger padding on the bottom of it and what that's going to do is it's going to force it down and it's going to make it look like the separation doesn't exist between the active panel and the content, which helps give us sort of a visual representation that those two elements are sort of touching each other.

So, as you are planning out your styles, you need to start thinking about things like this, like do I want those two to touch and the other two not to touch, and if so, how can I style these effectively to make that happen? I am going to continue to scroll down until I find our final selector that we are going to be modifying, and that is this one, the TabbedPanelsContentGroup. Now just like the other selectors -- and we've done before, I am going to get rid of the borders, so I am going to strip out all the borders there. I am going to change the background color to rgb (2, 99, 174). Now remember that is the blue color we've been using.

Then I am going to add some properties here. I am going to change color to white. So once again I want to change the actual text inside the content. I am going to change the font size and that's going to be .9ems, so a little bit smaller than the text around it. For padding, I am going to do 1em all the way around, and that's going to give space between the edge of the content group while in the text itself. And then finally, for line-height I am going to 1.8 and that's basically going to control the spacing of the lines inside of it. Okay, that's it! I know it seems like a lot of, I know we've been doing this for a little while, but I mean, think about it.

We only modified, what was it, four or five rules? That's it, that's all it took to do the styling that we are going to see as soon as we preview this in the page. So I am going to go ahead and preview this in one of my browsers and you can see what that styling has done for us. So there's that extra bit of padding at the bottom that's causing these guys to kind of overlap and touch. Notice that the margin is creating the spacing between these guys; that's not a border, and then clicking on it sort of just changes which one is the active tab, which again, has sort of given that illusion that those two are sort of joined, whereas this one isn't. Now of course they were also using the same color scheme that we have throughout the site.

By combining the functionality of these SpryWidgets with your own custom styles, like we did here, you can easily integrate interactive elements in your sites that can really create compelling experiences. Go ahead and experiment with all these SpryWidgets, play around with all of their settings, play around with their styling. If you're just experimenting, you can't really break anything, right? So just experiment with things, change things, see what they do. Once you are comfortable with how they're structured and styled, integrating them into your own projects becomes very, very easy to do.

Show transcript

This video is part of

Image for Dreamweaver CS6 Essential Training
Dreamweaver CS6 Essential Training

90 video lessons · 54235 viewers

James Williamson
Author

 
Expand all | Collapse all
  1. 1m 4s
    1. What is Dreamweaver?
      1m 4s
  2. 5m 44s
    1. Welcome
      1m 4s
    2. Using the exercise files
      2m 17s
    3. Learning web design
      2m 23s
  3. 1h 0m
    1. Looking at the Welcome screen
      5m 9s
    2. Exploring Windows and Mac interface differences
      5m 6s
    3. Arranging panels
      8m 44s
    4. Managing workspaces
      10m 14s
    5. Exploring the Application toolbar
      6m 21s
    6. Exploring the Document toolbar
      8m 47s
    7. Working with the Property inspector
      9m 30s
    8. Using the Insert panel
      6m 30s
  4. 53m 3s
    1. Understanding basic site structure
      3m 46s
    2. Exploring file naming conventions
      2m 10s
    3. Defining a new site
      5m 23s
    4. Managing files and folders
      7m 57s
    5. Adding remote servers
      7m 4s
    6. Uploading files
      12m 46s
    7. Previewing in browsers
      9m 11s
    8. Managing multiple sites
      4m 46s
  5. 36m 41s
    1. Creating new documents
      6m 49s
    2. Setting up new document preferences
      5m 30s
    3. Setting accessibility preferences
      6m 49s
    4. Working with starter pages
      4m 32s
    5. Managing starter pages
      13m 1s
  6. 37m 23s
    1. Getting text into Dreamweaver
      8m 43s
    2. Importing Word documents
      4m 6s
    3. Adding structure to text
      7m 35s
    4. Creating lists
      4m 35s
    5. Creating definition lists
      4m 0s
    6. Using the Quick Tag Editor
      8m 24s
  7. 44m 41s
    1. Exploring the Code toolbar
      5m 41s
    2. Setting code preferences
      7m 19s
    3. Using code hints
      8m 8s
    4. Wrapping tags
      5m 7s
    5. Adding comments
      6m 29s
    6. Using snippets
      7m 32s
    7. Formatting source code
      4m 25s
  8. 1h 19m
    1. Setting CSS preferences
      9m 32s
    2. An overview of the CSS Styles panel
      9m 23s
    3. Creating a new CSS rule
      6m 42s
    4. Using the CSS Rule Definition dialog
      7m 25s
    5. Organizing styles
      7m 22s
    6. Modifying style properties
      6m 17s
    7. Controlling CSS through the Property inspector
      6m 37s
    8. Attaching external style sheets
      5m 54s
    9. Using CSS visual aids
      7m 3s
    10. Using CSS Inspect
      6m 48s
    11. Using the Code Navigator
      6m 39s
  9. 1h 11m
    1. Managing assets in Dreamweaver
      7m 30s
    2. Setting external image editing preferences
      4m 26s
    3. Placing images on the page
      10m 12s
    4. Exploring Photoshop integration
      7m 17s
    5. Modifying Smart Objects
      9m 42s
    6. Modifying image properties
      8m 4s
    7. Styling images with CSS
      6m 45s
    8. Using background graphics
      7m 28s
    9. Positioning background graphics
      10m 10s
  10. 36m 23s
    1. Link basics
      3m 17s
    2. Setting site linking preferences
      2m 19s
    3. Creating links in Dreamweaver
      9m 17s
    4. Using absolute links
      3m 43s
    5. Using named anchors
      6m 41s
    6. Creating an email link
      5m 25s
    7. Creating CSS-based rollovers
      5m 41s
  11. 44m 30s
    1. Reviewing table structure
      5m 20s
    2. Importing tabular data
      6m 46s
    3. Creating accessible tables
      6m 11s
    4. Exploring basic table styling
      9m 42s
    5. Styling alternate rows
      8m 57s
    6. Creating custom table borders
      7m 34s
  12. 59m 15s
    1. Understanding how forms work
      2m 45s
    2. Reviewing form design
      3m 44s
    3. Creating accessible forms
      5m 16s
    4. Setting form properties
      2m 39s
    5. Using the fieldset and legend tags
      2m 52s
    6. Inserting text fields
      6m 56s
    7. Inserting list menu items
      7m 54s
    8. Inserting checkboxes
      4m 14s
    9. Inserting radio button groups
      3m 52s
    10. Inserting submit buttons
      2m 25s
    11. Exploring basic form styling
      8m 2s
    12. Exploring form element styling
      8m 36s
  13. 33m 25s
    1. Adding CSS3 transitions
      8m 29s
    2. Spry overview
      2m 44s
    3. Using Spry widgets
      3m 57s
    4. Adding Spry effects
      8m 1s
    5. Using the Widget Browser
      7m 4s
    6. Extending Dreamweaver
      3m 10s
  14. 1m 2s
    1. Additional resources
      1m 2s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
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

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 Dreamweaver CS6 Essential Training.

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


OK
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?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

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:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
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.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

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.