Prev | Current Page 229 | Next

Charles Wyke-Smith

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

Then
you can modify the attributes of the individual elements to your
speci?¬? c requirements, and when you link this style sheet to the
page, it will instantly style the form into this layout.
DESIGNING INTERFACE COMPONENTS 201
TINY SIGN-IN FORM
One of the toughest aspects of working with forms is getting them
to sit in small spaces. A sign-in form on a sidebar column is a great
example of what I mean (see Figure 6.21).
FIGURE 6.21 This sign-in form is
neatly packed into a column that is
only 128 pixels wide.
In this screenshot, the gray box is the border of a containing div that
represents a narrow column??”it??™s only 128 pixels wide.
Here is the markup














Problem with name or password


this div represents the column in
which you might place this element
tiny log-in form vertical
a single line text ?¬? eld
end single line text ?¬? eld
a password ?¬? eld
end password ?¬? eld
submit button
input must be wrapped in a block
level element to validate
end submit button
list for errors and links
adding class ???error??™ displays error
message paragraph
STYLIN??™ WITH CSS - CHAPTER 6 202




The ?¬? rst thing that you will notice is that I have marked-up this
form by copying elements of the larger generic form above (which
is part of the Stylib library), so it only took a few minutes to put it
together.


Pages:
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241