Padding has been added only to the top and bottom of a div. The padding attribute is displaying consistently for the form element, however, it is not behaving uniformly for the parent div of the form as illustrated in the image provided below.
Output:-
https://i.sstatic.net/wg9wq.jpg
#content {
font-family: arial;
margin-top: 30px;
background: #99ccff;
padding: 10px 0px
}
#content form {
background: #990000;
padding: 10px 0px;
}
<div id="content">
<form>
<label for="mid">MID:</label>
<input type="text" name="mid" id="mid" class="input" />
<input type="submit" name="sbmit" id="sbmit" value="Submit" />
</form>
</div>
All major browsers - Firefox, Opera, and Chrome are all displaying the same result.
I am curious about why the padding for the div is not maintaining consistent spacing on the top and bottom with regards to this issue?