New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Start learning with our library of video tutorials taught by experts. Get started

Dreamweaver CS6 Essential Training
Illustration by

Exploring form element styling


From:

Dreamweaver CS6 Essential Training

with James Williamson

Video: Exploring form element styling

You can add a tremendous amount of customization to your form elements through styles. Just be sure that any changes that you make to the default appearance of a form element, doesn't confuse users as to that form element's purpose. We're going to finish out our form by styling our individual form elements to match the Roux Academy's website's design. So again, I'm in the request.htm and just like I did in the last movie, I'm going to switch over to my main.css and just switch over to Code View and style my form elements. Now if I scroll down, I remember we're a little bit further down into the styles, around Line 590 or so, there are a couple of styles that have been added since our last exercise and they're really just sort of styling some of the list items and some of the labels like the labels for the text fields.
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

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
please wait ...
Dreamweaver CS6 Essential Training
9h 24m Beginner May 07, 2012

Viewers: in countries Watching now:

Discover how to build web sites, prototypes, and more in this course on Adobe Dreamweaver CS6. Author James Williamson shows designers how to take control of their site by properly naming and structuring files and folders; how to create new documents and web pages from scratch or with starter pages; and how to add content such as text, images, tables, and links. James also provides a background on the languages that power projects built in Dreamweaver—HTML and CSS—and introduces the programming features in the application, for developers who want to dig right into the code. The last chapter shows how to finesse your project with interactive content such as CSS3 transitions and Spry widgets.

Topics include:
  • Choosing and customizing a workspace
  • Defining a new site
  • Uploading files to your site
  • Creating new documents and web pages
  • Formatting source code
  • Working with CSS
  • Placing images and background graphics
  • Creating links
  • Styling a basic table
  • Creating a web form with buttons, check boxes, and list menus
  • Adding Spry effects
Subject:
Web
Software:
Dreamweaver
Author:
James Williamson

Exploring form element styling

You can add a tremendous amount of customization to your form elements through styles. Just be sure that any changes that you make to the default appearance of a form element, doesn't confuse users as to that form element's purpose. We're going to finish out our form by styling our individual form elements to match the Roux Academy's website's design. So again, I'm in the request.htm and just like I did in the last movie, I'm going to switch over to my main.css and just switch over to Code View and style my form elements. Now if I scroll down, I remember we're a little bit further down into the styles, around Line 590 or so, there are a couple of styles that have been added since our last exercise and they're really just sort of styling some of the list items and some of the labels like the labels for the text fields.

We want to focus our styling efforts this time on the individual form elements. Now one of the reasons why I'm definitely encouraging you to do this one by hand is because we're going to be using attribute selectors in this lesson. And attribute selectors in CSS allow us to target elements on the page with an attribute or an attribute of the specific value. So they're very, very useful selectors that you should be familiar with using. So our first selector is going to be little bit of a doozy here, so follow with me witih this one. We're going to do input and then I'm going to use a Square Bracket and you can find the Square Bracket just to the right of the P key.

You just don't hold the Shift key because you don't want the Curly Braces; you want Square Bracket. So I'm going to do input Square Bracket, no space there, and then I'm going to type Equals and then in Quotation Marks text. Close the Quotation Marks, close the Bracket. So essentially it's saying, hey, find any input element, remember, our form elements are all inputs for the most part, find any input element whose type equals text. So of course, it's just going to target, in this case, the text elements on the page. Now I have multiple different types of inputs that I want to target with this exact same selector, so I can group selectors together by using a Comma.

So right after that selector, I'm going to type in a Comma and then I'm going to type in the next selector that I also want to be affected by this formatting. So now I'm going to type in input, again, Bracket notation, type Equals email. So I think you can see kind of where we're going with this. We're targeting all of the text elements we placed in the page even though they might have different type attributes. The next thing we're going to do is input and then again, in Bracket notation type Equals search. Now I know we didn't put a search element on this particular page, but it's found elsewhere within the site so it makes sense to just style them all together.

And then finally, I'm going to do a textarea and then do a select. The textarea is of course the comment text box and when I hit Comma and do select, select is going to be our Submit button. So now I'm going to open up my Curly Braces, hit Enter twice and build that out. So we have this very long selector, but it's really doing nothing other than going into our form and cherry-picking specific elements that we want to style. All right! So I'm going to click inside that and I'm going to turn their border off. All input text fields have a default border. I'm going to turn that off by saying border: none. Then I'm going to give them a background color, this is going to replace the default background which is often white or sort of a gradient, so I'm going to replace that with an rgb color that comes from our site.

In this case, it's going to be that yellow color, so 249, 228, 130. I'm also going to set the width of this; I'm going to set the width to 318 pixels. That's going to give them all the defined width, it's exactly the same, it's going to help the form actually look a lot more organized because it's going to line all these guys up. The labels themselves are going to be above the form elements, so I don't have to worry about the label in effect interfering with the alignment of these form elements. Then finally, I'm going to do padding of .5 ems and then a font-size of 1 em.

So again, I'm making the text that's entered into the text field 1 em, so that's the text that people are going to see as they type in. Okay, let's keep going. I need to do a very specialized style for textarea, so I'm going to write a selector for it all by itself. Now the reason we're not adding the styling of course to our previous selector is because I only want this to apply to textarea. And this is a very small one, I'm just going to do a height of 128 pixels. All right! What is the height going to do for us? Well, that's going to drive exactly how much of the text that somebody types in can see at any given time.

There is an attribute that you can set on the text area tag to do that, but it's a little bit nicer and you have a little bit more control over doing that with CSS. All right! I'm going to going. I want to add some user interactivity to our form. I'd love it if we could let our user know kind of where they are within the form and how they're progressing through it. That's actually very easy for us to do by using a certain pseudo-selector. And that would be the focus pseudo-selector. So in the past, we've used hover; in this case, we're going to use focus. So I'm going to type in input. Remember, most of our form elements are inputs, I'm going to type in input:focus, textarea; it's like the only one that isn't, :focus.

So again, no space there. So I'm grouping those two together, I'm saying, hey, any input, and that could be any form element when we're focused into that, and the text are when that's focused into as well, let's go ahead and style that. And what we're going to do with this is just place a border around it. So we're going to do a border of 2 pixels solid and we're going to do that purple color which is rgb(168,88,163). So we're going to getting there.

I'm going to go ahead and save this and we've got just a couple more selectors to do. The next one I'm going to do another input selector and this time I'm going to target the Submit button. So I'm going to type=submit. I'm going to build out my Curly Braces and then inside that we're really going to go to tell in the formatting here. I'm going to do a background, so I'm going to strip out the default button background and I'm going to do rgb(2,99,174); that's the blue color that we've been using in our site.

I'm going to do a color of white and that's going to be the text of the actual button itself. I'm going to do some padding of .2 ems space .4 ems, so that's going to control how much size around the text the button has. I'm going to do no border, so a border of none is going to turn off the default border on this button. I'm going to do a font-size of 1 em and that's going to control how big the text within the button is. And I'm also going to turn the cursor on, I'm going to do a cursor of pointer, and any time that you're going to do something like this where you strip of the default styling of a button, it's really helpful if you let the user know that yes, this is indeed some something you can click on.

So in case that didn't get displayed by a certain user agent, I'm going to go ahead and explicitly tell the cursor to be the pointer. All right! So I'm going to save this. I'm going to go down to the next line and I'm going to type in select and remember, the selects are our pulldown and out lists. For those guys I'm going to give them a width of 328 pixels, so it makes them a little bit wider than the input text boxes, but in reality, because of the chrome, that width is going to look very similar to what we have for our text boxes. And then finally, I want to style the selected as the multiple list, so I'm just going to select and then a Bracket notation and multiple. All right! So what's going with this selector, well, with this selector, again, it's an attribute selector but it doesn't test for any specific value.

It just says, hey, does the attribute multiple exist. If it does, let's go ahead and style it. That way it's going to grab the list item but not the menu item. And in this case, I'm going to give it a height value of 162 pixels and that's going to control how many items within the list that I can see at any given time. All right! I'm going to go ahead and save this and then I'm going to preview this in any one of my browsers; it doesn't really matter. And as I scroll through, I can now see all our default styling. If I click on a form element, you can see the focus that we've established, the height of this is allowing me to see all the elements at once, and there's the height of my text area and the Submit button notice how drastically different it looks.

It doesn't really look like a button anymore, but when I hover over it, I get the little icon that tells me yes, this is indeed clickable, and when in my click, it's going to take me to the processing page. So our form now has a very clear visual styling that matches the rest of our site which is what we're going for. And by taking the advantage of Dreamweaver's form objects, when you place these in the page, you can quickly build well- structured accessible forms, and then as we've just done, style the form to match the rest of your design. And keep in mind that in order to truly build solid forms, you're going to need to do considerable planning on the front end, and unless you're going to be building the back end of your site as well, you'll need to consult with your developer to make sure the form that you're designing will work with the form processing that will be performed once the form is submitted.

There are currently no FAQs about Dreamweaver CS6 Essential Training.

 
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.
Upgrade now


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 Upgrade now

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

Notes cannot be added for locked videos.

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.