Prev | Current Page 225 | Next

Charles Wyke-Smith

"Stylin' with CSS: A Designer's Guide 2nd Edition"

19 A Select input allows
the user to make a selection from
a number of choices in a pop-up
menu.

The next form element is the select, shown in Figure 6.19, which
is better known by the term pop-up menu. I think it??™s pretty clear
how a select works from the markup above; just note that the
name/value pair passed to the server is the value of the name attribute
of the select element and the value of the value attribute of the
selected choice, drink_choice=tea, for example.
THE SUBMIT BUTTON INPUT CONTROL
FIGURE 6.20 Clicking the Submit
button causes all the form data to
be submitted to the URL speci?¬? ed
in the action attribute of the form
element.



Finally, there is the Submit button, shown in Figure 6.20, which
rather confusingly is an also an input element, just like a text ?¬? eld,
but which magically becomes a button when its type attribute is
submit. The value attribute simply determines the text that appears
on the button. Note that you can??™t just drop inline elements into
the page when the DOCTYPE is Strict??”the immutable laws of XML
demand that inline elements be enclosed in an appropriate block
level element, and according to the W3C validator, form just doesn??™t
input must be wrapped in a block
level element to validate
STYLIN??™ WITH CSS - CHAPTER 6 198
cut it for an input element.


Pages:
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237