We left a few things undone at the end of class Monday. They are:
tabindex to cause your text input fields to tab properly.name attribute to the TEXTAREA element. (The name is up to you, but it must be unique on the page.)The number of the attribute tabindex="num" determines the order in which the user will be able to tab between form controls. (The default order is left to right, top to bottom.) You may use tabindex with any INPUT, SELECT, or TEXTAREA elements.
By now you should have received emails from your mail form. Notice how the name=value pairs are organized. For example, I received this:
1_name: Rob 2_address: rcollins@earthlink.net computer: pc email_to: rcollins@earthlink.net end_display: https://www.angelfire.com/al4/rob0/thanks.html highschool: 1 known: yes
Notice what’s missing? The e-mail message itself! Because we forgot to give the TEXTAREA element a name attribute, the textarea was ignored when the form was submitted. Add a name and the problem is solved.
We used a layout table to control placement of the form elements. We made the borders visible to make it easy to see how the table was structured. To hide the table, just remove the border="1" attribute from TABLE.
We covered some new CSS properties in class:
background-attachment: This property takes one of two values: scroll and fixed. If you choose fixed the page content can be scrolled while the background image remains stationary.
background-color: Takes a color value.
background-image: Takes the URL of the image file you wish to use. Here’s how you format it:
background-image: url(images/myfile.jpg);
background: This “shorthand” property allows you to combine values for background-attachment, background-color, and background-image. For example: body { background: #ccffcc url(backgrnd.gif) fixed; } The order of the values is unimportant.
line-height: This property can be used with font-size to control the leading or amount of space between lines. Line-height should always be at least a little greater than font-size.
font: Another “shorthand” property, and a very useful one. It combines values for font-style, font-weight, font-variant (i.e., small-caps), font-size, line-height, and font-family. This example uses a font-size of 1em and line-height of 150%:
body {
font: normal bold 1em/150% "Trebuchet MS",Verdana,sans-serif;
}
Properties may be omitted. If line-height is omitted, then the font-size appears without a slash. It is best to put the font-size and font-family values last.