HTML and CSS Reference
In-Depth Information
To create a style rule for the label text and check box control:
1. Go to the forms.css file in your text editor.
2. At the bottom of the file, insert the following style rules (see Figure 6-46):
/* Check box styles */
#newsletter {
color: rgb(233, 69, 0);
float: none;
margin: 10px auto;
text-align: center;
width: 90%;
#newsletter input {
display: inline;
float: none;
width: 20px;
figure 6-46
style rules for the label and check box
displ a ys the label
text i n medium red
displays the label text without floating
sets the top/bottom margin to 10
pixels, centers the label text, and sets
the width to 90% of the page width
displays the check box inline within the
label and without floating, and sets the
width to 20 pixels
3. Save your changes to the style sheet and then refresh survey.htm in your Web
browser. Figure 6-47 shows the current state of the Web form.
Search WWH ::

Custom Search