Skip to content

Commit a21e2e9

Browse files
fix(CSS): Fixes Label covered by text area (#708)
Co-authored-by: Jaykumar Mandaviya <[email protected]>
1 parent 0e83eed commit a21e2e9

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

html/forms/your-first-HTML-form/first-form-styled.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
<meta charset="utf-8" />
55
<title>Your first HTML form, styled</title>
66
<style>
7-
form {
7+
body{
88
/* Just to center the form on the page */
9-
margin: 0 auto;
10-
width: 400px;
9+
text-align: center;
10+
}
11+
form {
12+
display: inline-block;
1113
/* To see the outline of the form */
1214
padding: 1em;
1315
border: 1px solid #ccc;
@@ -27,7 +29,8 @@
2729
label {
2830
/* To make sure that all labels have the same size and are properly aligned */
2931
display: inline-block;
30-
width: 90px;
32+
min-width: 90px;
33+
3134
text-align: right;
3235
}
3336

0 commit comments

Comments
 (0)