HTML and CSS Reference
In-Depth Information
3. Save your changes to the file.
Next, you'll create style rules so that the submit and reset buttons appear cen-
tered below the rest of the form content.
4. Go to the forms.css file in your text editor. At the bottom of the file, insert the
following code, as shown in Figure 6-64:
/* Button styles */
form p {
text-align: center;
input[type=”submit”], input[type=”reset”] {
display: inline;
float: none;
height: 40px;
width: 200px;
figure 6-64
style rules for the submit and reset buttons
centers the paragraph containing
the two form bu tt ons
displays the buttons inline rather
than as blocks
displays the buttons without floating
sets the button height to 40 pixels
sets the button width
to 200 pixels
5. Save your changes to the file and then refresh the survey.htm file in your Web
browser. Figure 6-65 shows the completed Web page with all of the form ele-
ments and controls.
Search WWH ::

Custom Search