Monday, April 2, 2012

A List Apart: Articles: Suckerfish Dropdowns

A List Apart: Articles: Suckerfish Dropdowns



last week, i posted a video on how to make a drop down only in css... (and html) we'll do that in class today and more... here's an older article on how to do so... from a list apart.

Meet the markup

To start, we should use the best method for defining a navigation menu — a list. For this example, we will work on a simple HTML unordered list. {Line wraps are marked ». –Ed.}
Quite straightforward really — nice and neat HTML that, as a result, is highly accessible. But now we want to transform this into a dynamic list — the first level of list items will make up a horizontal menu bar from which the second level lists will drop down.

class 9

notes

sample portfolio structure

gradients

quick-tip-understanding-css3-gradients/

Ultimate CSS Gradient Generator

dabblet

Monday, March 26, 2012

▶ CSS Drop Down Navigation Menu Tutorial on Vimeo: Couch Mode

▶ CSS Drop Down Navigation Menu Tutorial on Vimeo: Couch Mode

WNM 608, Module 8: Forms

WNM 608, Module 8: Forms class lecture

Wufoo Online Form Builder

Wufoo  Online Form Builder

the id v the class in css...

The difference between an ID and a class is that an ID can be used to identify one element, whereas a class can be used to identify more than one.

Use IDs when there is only one occurence per page. Use classes when there are one or more occurences per page.


In the CSS, a class selector is a name preceded by a full stop (.) and an ID selector is a name preceded by a hash character (#).
So the CSS might look something like:


#top {
 background-color: #ccc;
 padding: 1em
}

.intro {
 color: red;
 font-weight: bold;
}

The HTML refers to the CSS by using the attributes id and class. It could look something like this:


<div id="top">

<h1>Chocolate curryh1>

<p class="intro">This is my recipe for making curry purely with chocolatep>

<p class="intro">Mmm mm mmmmmp>

div>

Grouping

You can give the same properties to a number of selectors without having to repeat them by separating the selectors by commas.
For example, if you have something like:

h2 {
 color: red;
}

.thisOtherClass {
 color: red;
}

.yetAnotherClass {
 color: red;
}
You could make it:

h2, .thisOtherClass, .yetAnotherClass {
 color: red;
}

Nesting

If the CSS is structured well, there shouldn't be a need to use many class or ID selectors. This is because you can specify properties to selectors within other selectors.
For example:

#top {
 background-color: #ccc;
 padding: 1em
}

#top h1 {
 color: #ff0;
}

#top p {
 color: red;
 font-weight: bold;
}
Removes the need for classes or ID's if it is applied to HTML that looks something like this:

<div id="top">

 <h1>Chocolate curryh1>

 <p>This is my recipe for making curry purely with chocolatep>

 <p>Mmm mm mmmmmp>

div>
This is because, by separating selectors with spaces, we are saying 'h1 inside ID top is colour #ff0' and 'p inside ID top is red and bold'.
This can get quite complicated (because it can go for more than two levels, such as this inside this inside this inside this etc.) and may take a bit of practice.

Assignments


Assignment 8.1: Forms


Description

Make two form pages. The first form page is a simple demonstration of your knowledge of the form controls. The first form must include the following controls:
  • Text input
  • Password box
  • Radio button set of at least five elements
  • Check box set of at least five elements
  • A textarea box
  • A select menu presented as either a list box or a drop menu with at least seven options
  • A submit button and a reset button
Be sure to group your controls into fieldsets with legends when appropriate.
The second form must be a graphically rich page using CSS to control the look and feel of the page. The page must include at least five of the controls listed above and a file control. The submit and reset button must be graphics.
Validate your code. Make the necessary corrections. Upload your pages to your web server space and post the URLs in the Class Discussion.

Purpose

The purpose of this assignment is to review the form tags and understand how to use form tags with CSS:
  • To learn the underlying HTML of forms
  • To write accessible forms
  • To design make graphically rich forms

Tools

  • TextWrangler (Mac) or Notepad ++ (PC)
  • Firefox with FireFTP installed

Due Date

This assignment is due by the end of Module 8.

Submission Directions

Place all of your files in a folder, and name the folder m8_yourlastname. Save your folder to your server space. ZIP the local copy of your folder. Post the URL to the appropriate topic in the Class Discussion, and attach the ZIP of the folder.
Use the following file-naming convention:
  • m8_yourlastname.zip

 

  • Assignment 8.2:  Project 3: Personal Portfolio


For this project you will be building a portfolio of your work. The portfolio will serve as a vehicle for you to display your work as you progress through your degree program. You are building a website for yourself to display your growing skills. This portfolio will evolve over the course of your education. As you take more courses you will have more work to show.

This is a professional portfolio, and as such it is a more targeted site. You should select and carefully edit the work you want to show. This portfolio is a demonstration of your professional skills and judgment.

Your target audience includes your department director, instructors, classmates, and eventually, future employers. You will use this site as part of your mid-point review presentation. The committee will want to know more about you. They will need to see demonstration of your technical skills as well as your design skills. As you think about this portfolio, consider how you want to be perceived and design accordingly.
Your portfolio should include the following sections:
  • Home: to establish the look and feel of your site. To inform the users what to expect in your site.
  • Personal history/Artist's statement (optional): this can be incorporated in the home page if desired.
  • Resume: Must be in HTML with CSS. You can link to a PDF as well, but there needs to be an HTML version incorporated in the site.
  • Portfolio: Include carefully chosen examples of your work. How you present them is up to you, but be sure that they read well on the Web. Extremely large images and videos will need to be optimized, and in some cases reduced to work well. If you have professional experience and wish to show some of that work as well, you should do so.
  • Contact Page 
Final content and page list will vary somewhat from student to student -- the important thing is that the final piece fairly represents you.
A further consideration is that your portfolio is a "living" document. It is not a static brochure, but rather a growing, evolving site. As you think through the navigation, keep in mind that you will be updating this site in the future to include a growing body of work.
Each page must include:
  • The site name and any branding you want associated with you
  • Global navigation to all the sections of the site
  • Local navigation, where appropriate
  • A breadcrumb trail where appropriate and only if your site is deep enough to require one
  • The section title
  • The page title
  • The content
  • A foot with a copyright
If you already have a portfolio that you like and fits you well, you can propose to create another site, but you will need to show your site and get approval. Everyone in this program is required to have a web-based portfolio.
See DUE DATES section below for breakdown of individual module assignments.
Technical Requirement
This is a web-based portfolio. You should design using web "friendly" technologies. The site should be developed in HTML with external CSS and JavaScript. You may use Flash to enhance your site with animation and interactivity. This is an HTML class -- you may not build a Flash site. You may include sound files, video, animation, and anything else you feel will show your work off in its best light.

Purpose
  • To create a showcase for your growing body of work.
  • To gain experience designing a site that will be updated on a regular basis.
  • To gather examples of your work and collect your creative history as a student.
Tools
  • Mac: BBedit
  • PC: Notepad ++
  • Use the image editor of your choice -- Fireworks or Photoshop
  • JavaScript and JavaScript Libraries
  • Flash, if desired, to enhance the site
  • Software for creating and compressing sound such as Audition or Garageband
  • Software for creating and compressing video such as Quicktime Pro or Sorenson Squeeze
Due Dates
Due Module 8: Define, Describe & Gather -- Begin collecting your content. Make a list of all the work you would like to show. Begin writing your resume, if you don't already have one. Write one paragraph that describes you as an artist. Write a second paragraph about what you would like your portfolio to do for you -- what would you like people to understand about you from viewing your portfolio?
Due Module 9: Finish collecting content and begin designing -- Continue to collect and refine your content. Make a list of all the different kinds of media your portfolio will need to accommodate. Begin grouping your content into categories. Start thinking about the hierarchy of your categories. Complete your resume.
Make a list of everything that must be on each page. Using the media of your choice, make your first design pass. You can use paper, pen and pencil or use your computer. Keep your designs flexible. Remember, this is just your first pass. Pick just three pages from your site to design -- don't try to do all of them. Be sure you have included everything that must be on every page.
Due Module 10: Redesign -- Using the feedback you received from your first design, re-work your site design. Pay particularly close attention to the navigation. Pay attention to the value range in your colors. Make sure there is enough contrast in the darks and lights.
Due Module 11: Complete design and begin coding -- Do any needed final tweaks on your design and begin coding. Validate your pages as you go. Separate the CSS out into external sheets and link to your external CSS. If you are going to need any special kind of interactivity, begin planning for it now. If you want to use some JavaScript or JavaScript Libraries, start looking the code you will need.
Due Module 12: Continue coding and begin production work on your content -- Continue making your pages and refining your code. Make any last tweaks to your designs as you code. Make sure all your pages validate.
Due Module 13: Finish coding and complete production work on your content -- Complete coding. Get as much working as you possibly can, even if it is rough.
Due Module 14: Final clean up, editing, submit -- Use this module to clean up any loose ends. This is the time to test your site and fix all the little snags and tidy up the messy bits.
Submission Directions
Put your files in a folder. Name your folder "m8_final_yourlastname". Upload your folder to your server. ZIP the local copy of your folder. Post the URL to the appropriate Class Discussion topic and attach the ZIP of the folder.

Forms: Student Outcomes

  • Understand the nature and uses of forms.
  • Learn the best practices for creating accessible forms.
  • Work with the different form elements.
  • Create forms that validate.
  • Style forms with CSS.
Forms are the primary way information is gathered and passed from users to the server. They represent one of the most widely used methods of creating customized web applications. It's hard to imagine the Web without forms.
We have grown so accustomed to using form elements in web pages that we don't even notice them for what they are any longer. Some of the most common uses of web forms include:
  • Search boxes
  • Shopping carts
  • Booking a ticket online
  • Posting a blog or Twitter entry
  • Posting a video to YouTube
  • Commenting on a news story
  • Writing on a friend's wall on Facebook
  • Accessing online banking
  • Logging into this course
  • Participating in the Class Discussion
Forms are relatively easy to code, yet difficult to design well. The HTML that creates all the form elements is quite straightforward. The form elements provide simple, familiar tools for the user to input information. There is a small but powerful collection of form elements. Together they make up the front-end interface for forms. They include:
  • form: creates the form, tells the browser what to do with the form and how to do it
  • input: input controls include text fields, password fields, radio buttons, check boxes and more
  • button: generic input buttons
  • textarea: multi line text boxes with scrolling for large text input
  • select: scrolling list, multiple choice or drop menu
  • option: options within the select menu
  • fieldset: for making groupings of related controls, used to make forms accessible
  • legend: assigns an action to the group, used to make forms accessible
Forms use these controls to collect user input. Usually the input is validated using JavaScript before it is passed up to the server to be parsed and processed. There, the server uses server-side scripts to decide how to handle the input depending on how the form was intended to be used. The writing of these scripts is beyond the scope of this course, but in this module we will explore the client side of making usable forms.

Forms & Scripts

The basic elements of a form are relatively simple HTML tags. The information is gathered from the user and passed to the server. The server needs to use a script of some kind in order to process the information it receives. The script can be written in any language the developer favors. Some of the most commonly used languages are Perl, Java, Ruby, PHP and Cold Fusion. The form tag references the script and the script does the work of sorting, formatting, and directing the data to where it should go.
With a good script you can do all kinds of things with your data. The interface between HTTP, which is responsible for the transaction and the script that is being called, is referred to as the Common Gateway Interface, or CGI. The scripts are stored in a folder on the server. By convention the folder is called "cgi_bin". If you are a designer you may not want to/have to write your own scripts. Fortunately, there are many services available for free on the Web. If you need something special you can always hire a programmer, or learn to code them yourself. Your ISP (Internet Service Provider) probably has a number of pre-written ones available for your use. It's worth checking with them to find out. Sometimes they have message boards and email programs available at no extra charge.

An excellent resource is Wufoo.com. This site provides a drag and drop interface for creating forms that it can attach scripts to as well host. It's also a great example of Web 2.0 design. Check it out at: http://wufoo.com/

The Form Tag

The best way to learn how to build a form is to just go ahead and build one. We are going to write a form that allows people to talk about their pets.

 Make a folder and name it "m8_yourlastname". Open up your template page and go to File > Save As and resave the file as "m8_form1_yourlastname.html".

The first step in making a form is declaring a form. The form tag wraps completely around all the controls used in the form. The form tag has a number of attributes, the most important of which are "action" and "method".

The "action" attribute points to the script that the server will use to process the form. It is the URL to the script. It could look like this:
action="cgi_bin/guestbook.php"
If you just want to have the data sent to your email address with no formatting you can always just use your email address as the action. For the purposes of this module you can send your forms to your own email address. The code will look something like this:
action="mailto:me@mysite.com"
The method attribute has two values:
  • GET
  • POST
The method specifies how the information is transferred to the server. The information is transferred in the form of "name=value pairs". The pairs are separated by "&". A series of "name=value" pairs looks like this:
dogName=fido&dogBreed=whippet&favoritefood=kibble
The GET method appends the "name=value" pairs to the end of the URL when the form is submitted. As a result it is visible to everyone while it is being passed. This is fine for short variables that are not sensitive, but you may think twice about asking people to send their credit card numbers, exposing them to prying eyes. An example of a GET method looks like this:
http://www.google.com/search?hl=en&ie=ISO-8859-1&q=dante
The POST method attaches the data after the URL and certain header information. The key word POST tells the server to expect more information after the header information has been read. This is the method that the W3C recommends. Sensitive information is not visible and secrets are not exposed. The POST method can handle long, elaborate postings.
Add the form tag to your HTML page like this:






Monday, March 19, 2012

Assignment 7.... Accessibility!

Assignment 7.1: Project 1: Recipes From My Friends (Part 5)

Overview
We have been writing HTML and CSS from the very beginning of the course. We have also been learning about the Web as a unique design environment. In this project we are going to bring them all together to create a website. All of you have put together a recipe for your demonstration files. For this site you will collect all the recipes from your fellow students and collect them into a finished website. Your site will include the following pages:

Home Page Recipe Pages (one from each person in the class) Table of Measurements You will need to organize all of these pages into a maintainable website. I recommend that you keep the folder structure simple. Place all the HTML pages into a folder with an assets folder for the images. Your sites will require navigation. In the modules we use a two-column layout with utility links at the top and local navigation on the left. You can stick with this system or come up with one of your own.
The look and feel is also up to you. You can re-shape and re-design the recipes that you get from other students. Feel free to experiment with imagery, icons, colors, and typography. CSS is to be used for all styling and positioning. Tables may be used for tabular data only.
One of the big issues you will need to resolve is how to handle the background image. In my example, I used a head of cabbage. Obviously, this will not be appropriate for many recipes. There are many design solutions here. You could have:
A unique background image for each recipe
One graphic that reflects the site as a whole
A watermark
No background image
Unique illustrative graphics for each page
A strip graphic
Graphic buttons
Some combination of the above -- the possibilities are endless!
Project Breakdown
Module 3: Collect, proof, customize and refine all the recipes from your classmates.
Module 4: Begin designing the look and feel of your recipe site.
Module 5: Rework the look and feel of the recipe site and begin roughing out code. Externalize the CSS.
Module 6: Make the Comparative Table of Measurements and refine the CSS. Add navigation and link the pages.
Module 7: Finish the code and clean up any remaining details.
Description
Make the Comparative Table of Measurements. Add navigation to all your pages. Link all your pages. Continue to refine your CSS. Finish preparing graphics. Begin page clean up.
Purpose
Learn to manage a multi-page website.
Design a functioning navigation.
Use CSS to control the layout of multiple pages.
Prepare and use appropriate graphics.
Tools
Mac: TextWrangler or your preference
PC: Notepad ++ or your preference
Recipes from Module 3
If you want to include an image, use the image editor of your choice -- Fireworks or Photoshop

Due Date
This assignment is due by next class.

Submission Directions
Put your files in a folder. Name your folder "project1_yourlastname". Upload your folder to your server. ZIP the local copy of your folder. Post the URL to the appropriate Discussion topic and attach the ZIP of the folder.

Throughout the semester you will be building demonstration files. By the end of the semester you will have a sizable collection of pages demonstrating different skills. For your Midterm you will collect all the demonstration files from the first half of the course into a single site. Your site will need a home page that describes and links to every demonstration. The individual demonstrations need not link to each other.
You home page must include:


Your name
A paragraph about you
A photo/portrait of you
The name of every demonstration file with a description
A link to every demonstration file
Organize your demonstrations into folders. Organize the folders in a way that makes sense to you. I suggest you keep your folder structure as flat as you can.

Use HTML and CSS to make your page. Design your page and make it into something special! Don't be afraid to have fun with it. You can add thumbnails, background images, personal logos, icons, wacky colors, goofy type -- just so long as it's legible. Have fun.

Validate your code. Make the necessary corrections. Upload your recipe to your web server space and post the URL to your Demonstration Library in the Discussion.
You will be updating this page again at the end of the course. As part of the Final you will be collecting and adding all the demonstrations from the second half of the semester.
Purpose
To gain practical experience working with structured content and using HTML to express the structure.

Submission Directions
Put your files in a folder. Name your folder "demo_library_yourlastname". Upload your folder to your server. ZIP the local copy of your folder. Post the URL to the appropriate Discussion topic and attach the ZIP of the folder.
Summary
This module highlighted the importance of accessibility when it comes to web design. The Web Content Accessibility Guidelines 2.0 outline the four main principles: that websites should be built in such a way as to be perceivable, operable, understandable and robust for those with and without disabilities.
Assignments
Assignment 7.1: Project 1: Recipes From My Friends (Part 5)
Assignment 7.2: Project 2: Demonstration Library