i know has been answered none of solution seem work me. trying label , 2 small form fields 1 line. around 90px space between label tag , field. image below.
i having problem getting label "monday", onto same 2 field forms, , when manage accomplish this, 1 out of 2 form fields falls onto following line. having worse luck simple.
currently looks like:
please help!
div.form-group{ width:100%; float:left; width: 100%; margin-left: 450px; margin-top: -340px; z-index:-2; } div.form-group > label,[type=text]{ float:left; } div.form-group > label{ width:100px; text-align: left; padding-left: -10px; margin-right: 40px; z-index:9; } div.form-group[type=text]{ margin-left: 50px; z-index: 1 }
<div class="form-group"> <label for="monds"> monday </label> <input type="text" name="monds" id="mon" class="open_hours" placeholder="--:--" required tabindex="8"> <input type="text" name="monds" id="monday" class="open_hours" placeholder="--:--" required tabindex="9"> <div>
is this looking for?
html:
<div id='firstcolumn'> <label for='frname'>franchise name</label> <input type="text" name="frname" id="frname" placeholder="enter franchise name" required tabindex="1"/> <br /> <label for='name'>your name</label> <input type="text" name="name" id="name" placeholder="joe blogs" required tabindex="2"/> <br /> <label for='address'>address</label> <input type="text" name="addressno" id="addressno" placeholder="no" required tabindex="3"/> <input type="text" name="addressstreet" id="addressstreet" placeholder="street" required tabindex="4"/> <input type="text" name="addresstown" id="addresstown" placeholder="town / city" required tabindex="5"/> <input type="text" name="addresszip" id="addresszip" placeholder="zip code" required tabindex="6"/> <br /> <label for='phone'>phone number</label> <input type="text" name="phone" id="phone" placeholder="enter phone number" required tabindex="7"/> <br /> <input type='submit' /> </div> <div id='secondcolumn'> <p>opening hours</p> <div> <label for="monds"> monday </label> <input type="text" name="monds" id="mon" class="open_hours" value='00:00' required tabindex="8"> <span>-</span> <input type="text" name="monds" id="monday" class="open_hours" value='00:00' required tabindex="9"> <hr /> </div> <div> <label for="tues"> tuesday </label> <input type="text" name="tues" id="tue" class="open_hours" value='00:00' required tabindex="10"> <span>-</span> <input type="text" name="tues" id="tuesday" class="open_hours" value='00:00' required tabindex="11"> <hr /> </div> <div> <label for="weds"> wednesday </label> <input type="text" name="weds" id="wed" class="open_hours" value='00:00' required tabindex="12"> <span>-</span> <input type="text" name="weds" id="wednesday" class="open_hours" value='00:00' required tabindex="13"> <hr /> </div> <div> <label for="thus"> thursday </label> <input type="text" name="thus" id="thu" class="open_hours" value='00:00' required tabindex="14"> <span>-</span> <input type="text" name="thus" id="thursday" class="open_hours" value='00:00' required tabindex="15"> <hr /> </div> <div> <label for="fris"> friday </label> <input type="text" name="fris" id="fri" class="open_hours" value='00:00' required tabindex="16"> <span>-</span> <input type="text" name="fris" id="friday" class="open_hours" value='00:00' required tabindex="17"> <hr /> </div> <div> <label for="sats"> saturday </label> <input type="text" name="sats" id="sat" class="open_hours" value='00:00' required tabindex="18"> <span>-</span> <input type="text" name="sats" id="saturday" class="open_hours" value='00:00' required tabindex="19"> <hr /> </div> <div> <label for="suns"> sunday </label> <input type="text" name="suns" id="sun" class="open_hours" value='00:00' required tabindex="20"> <span>-</span> <input type="text" name="suns" id="sunday" class="open_hours" value='00:00' required tabindex="21"> <hr /> </div> </div>
css:
#firstcolumn label, #secondcolumn p { color: red; } #firstcolumn { width: 50%; float:left; } #firstcolumn label, #firstcolumn input { width: 90%; display:block; } #addressno + input, #addressno + input + input, #addressno + input + input + input { margin-top: 5px; } #secondcolumn { float:left; width: 50%; } #secondcolumn div { display:block; width: 50%; } #secondcolumn label { width: 90px; margin-top: 15px; } #secondcolumn label:first-of-type { margin-top: 0px; } #secondcolumn input { width : 15%; text-align: center; float: right; } #secondcolumn span { float: right; }
Comments
Post a Comment