I am very new to css and html, and can't seem to find a common sense way to group these elements together so I can put two clusters of forms and headers on the same line. I am trying to implement responsive design with an emphasis on mobile first. Ideally, I would love to have these two clusters of forms centered on the same line with a nice big hyphen in between them.
I have already tried div-ing the start and end times and floating them left and right, but the spacing is wonky. The end top and bottom header line up, while the forms oddly move outside to the right.
h2 {
border-bottom: 2px solid #ccc;
padding-bottom: 5px;
text-align: left;
color: gray;
font-size: 16px;
font-weight: normal;
width: 131px;
}
.min, .sec, .hour {
width: 33px;
box-sizing: border-box;
border: 0 solid #ccc;
font-size: 16px;
margin: 0;
padding: 0;
background: white;
display: inline-block;
}
h3{
border-top: 2px solid #ccc;
width: 131px;
}
*:focus {
outline: 0;
box-shadow: none;
}
#start {
float: left;
}
#end {
float: right;
margin: 0;
}
<div id="start" align="middle">
<h2 class="start-time">start</h2>
<div class="time">
<form class="hour">
<input type="text" size="3" maxlength="3" placeholder="hr">
</form>
:
<form class="min">
<input type="text" size="3" maxlength="2" placeholder="min">
</form>
:
<form class="sec">
<input type="text" size="3" maxlength="2" placeholder="sec">
</form>
</div>
<h3></h3>
</div>
<div id="stop" align="middle">
<h2 class="end-time">end</h2>
<div class="time">
<form class="hour">
<input type="text" size="3" maxlength="3" placeholder="hr">
</form>
:
<form class="min">
<input type="text" size="3" maxlength="2" placeholder="min">
</form>
:
<form class="sec">
<input type="text" size="3" maxlength="2" placeholder="sec">
</form>
</div>
<h3></h3>
</div>