HTML and CSS Reference
In-Depth Information
We would love to show you a screen capture of what this menu looks like in a browser, but because no
browsers yet support these elements, you'll just have to use your imagination. The current lack of browser
support also means the menu and command elements aren't really practical to use right now, but hopefully
they'll be usable in the very near future.
Required Attributes
label : the name of the command as shown to the user.
Optional Attributes
checked : a Boolean attribute that, when present, indicates that the command is preselected
when the page initially loads (or has been toggled by some other action, if the attribute is added
disabled : a Boolean attribute indicating that the command can't be selected.
icon : an image representing the command or decorating its text label. This attribute's value is the
URL of an image file.
radiogroup : gives the name of the group of commands (with a type=" radio "), that will be
toggled when the command itself is toggled. This attribute can only be present when the
command's type attribute is radio .
type : indicates the type of command the element represents, either command (the default),
radio , or checkbox .
Styling Forms with CSS
As we've said before, form controls will appear slightly different in just about every browser on the planet.
This is true partly because they're not strictly web elements; they're basic elements of any graphical user
interface. Many web browsers that run on desktop computers or mobile devices don't possess any
ingrained presentation logic for rendering form controls. Rather, they call upon the local operating system
to display those controls in whatever visual style is native for that operating system.
Most browsers for Mac OS X rely on that operating system's standard rendering of form controls, so
buttons, checkboxes, and selection menus on a Mac appear in glossy, candy-coated splendor. Internet
Explorer is such a deeply entrenched part of the Windows operating system that form controls will look
completely different under Windows 7 compared to what you'd see in the same browser running under
Windows Vista. Firefox, Chrome, and Opera—all available for Windows, Macintosh, and Linux—render
form controls in different ways on each of those platforms because they employ different native controls.
Figure 8-33 shows the same form in both Safari for the latest Mac OS X and Internet Explorer 7 for
Windows XP (long outdated, but many people around the world still use it). You can see just how
differently these controls are presented.
Search WWH ::

Custom Search