How to remove extra spacing between text field and paragraph(p) element using CSS? I have specified the height, width and padding in percentages. Spacing is proper between the input elements. But spacing is not proper between the input elelment and paragraph(p) element. Can anyone please tell me the solution.
Below is my code snippet:
<head>
<style type="text/css">
.mainview{
margin: 0;
width: 100%;
height: 100%;
white-space:pre-wrap;
overflow:scroll;
padding-top: 5%;
padding-bottom: 5%;
background: url(mainview.png);
position: relative;
}
.in{
font-family: Arial;
font-size: 18pt;
left: 20%;
right: 20%;
width:60%;
position: absolute;
}
.dob{
font-family: Arial;
font-size: 18pt;
color: #FFFFFF;
left: 20%;
right: 20%;
width:60%;
position: absolute;
}
</style>
</head>
<body>
<div class="mainview" style="overflow-y: scroll;">
<input type="text" placeholder="Firstname" class="in" />
</br>
<input type="text" placeholder="Lastname" class="in"/>
</br>
<p class="dob">DOB</p>
</br>
<input type="email" placeholder="Email" class="in"/>
</div>
</body>