/* Mostly from the MDN web docs tutorial, IIRC. */ form { /* To see the outline of the form */ padding: 1em; border: 1px solid #CCC; border-radius: 1em; } label { /* To make sure that all labels have the same size and are properly aligned */ display: inline-block; width: 9em; text-align: right; } /* ---------------------------------------------------------------------- unsetting the normalize reset (I like it better this way) ---------------------------------------------------------------------- */ fieldset { border: 1.5px solid #c0c0c0; margin: 0 2px 1ex; padding: 0.35em 0.625em 0.75em; } /** * 1. Correct `color` not being inherited in IE 8/9/10/11. * 2. Remove padding so people aren't caught out if they zero out fieldsets. */ legend { border: 0; /* 1 */ padding: 0 2px; /* 2 */ } /* ---------------------------------------------------------------------- */ fieldset label { /* To make sure that all labels have the same size and are properly aligned */ width: 8em; } input:not([type='date']):not([type='reset']):not([type='submit']), textarea { /* To make sure that all text fields have the same font settings By default, textareas have a monospace font */ font: 1em inherit; /* To give the same size to all text fields */ width: 35em; box-sizing: border-box; /* To harmonize the look & feel of text field border */ border: 1px solid #999; } /*input[required], textarea[required] { background: #fff3f3; } */ ::placeholder, textarea { font-style: italic; } input:invalid, textarea:invalid, select:invalid {background: yellow; } input:focus, textarea:focus { /* To give a little highlight on active elements */ border-color: #000; } textarea { /* To properly align multiline text fields with their labels */ vertical-align: top; } textarea:not([name='event-loc-streetAddress']):not([rows]) { /* To give enough room to type some text */ height: 5em; } input[type='reset'], input[type='submit'] { margin-top: .4em; font-size: 1rem; } input[type='reset'] { /* To position the buttons to the same position of the text fields */ margin-left: 9.2em; }