html - Why is my input box being forced onto another line? -


i'm trying put input box next labels (reps sets , weight) keeps on being forced onto next line... how can force them onto same line? i've used inline-block in input css formatting , tried putting inline-block in label css still stays on next line. how can fix this?

website far

    * { -webkit-box-sizing:border-box; -moz-box-sizing:border-box; -ms-box-sizing:border-box; -o-box-sizing:border-box; box-sizing:border-box; }  html { width: 100%; height:100%; overflow:scroll;      background: url("gym.jpg") no-repeat center center fixed;      -webkit-background-size: cover;     -moz-background-size: cover;     -o-background-size: cover;     background-size: cover; }  body {      width: 100%;     height:100%;     font-family: 'open sans', sans-serif; }  .login {      position: absolute;     top: 43%; /* form 45% top */     left: 50%; /* form 50% across screen*/     margin: -150px 0 0 -150px; /* position of form on screen */     width:300px; /* width of form */     height:300px; /* height of form */     border: 5px; }  h1 {      color: #fff;     text-shadow: 2px 2px 4px #000000;     letter-spacing:1px;      text-align:center;      margin-bottom: 15px;  /* space below title */     }  h2 {     color: #fff;     text-shadow: 2px 2px 4px #000000;     letter-spacing:1px;      text-align:center;      margin-bottom: 15px;  /* space below title */ }  h3 {     color: #fff;     text-shadow: 2px 2px 4px #000000;     letter-spacing:1px;      text-align:center;      margin-bottom: 15px;  /* space below title */ }  h4 {     color: #fff;     text-shadow: 2px 2px 4px #000000;     letter-spacing:1px;      text-align:center;      margin-bottom: 15px;  /* space below title */ }  label {     color: #fff;     text-shadow: 2px 2px 4px #000000;     letter-spacing:2px;      text-align:center;      margin-bottom: 15px;  /* space below title */ }  .login input {     width: 100%; /* 100% of form */     margin-bottom: 10px; /* gap in between each element */     background-color: rgba(0,0,0,0.5); /* background color (opacity 3) of input elements in login class*/     border: none; /* border of input elements in login class */     outline: none;     padding: 10px; /* height of each input element in login class*/     font-size: 13px; /* font size */     color: #fff; /* font color */     border: 1px solid rgba(0,0,0,0.2); /* 1 pixel black border of opacity 2 each input element in login*/     border-radius: 4px; /* can curve login details elements */ }  .slide input {     width: 10%; }  .exdisplay input {     width: 75%;     text-align: center; }  .statdisplay input {     width: 30px;     height: 10px;     text-align: center; }  .displayexermanual h3 {     display: inline-block;     margin-top: 5px; }  .displayexermanual input {     width: 10%; }  /* hiding input box */  #reps{     display: none; }  #exercheckbox:checked ~ #reps{     display: block; }  #sets{     display: none; }  #exercheckbox:checked ~ #sets{     display: block; }  #weight{     display: none; }  #exercheckbox:checked ~ #weight{     display: block; } 

html:

  <body>     <div class="login">       <h1>gym planner</h1>     <form method="post" action="storeexercisesauto.php">         <div class="displayexermanual">             <input type="hidden" name="exercheckbox" value=0>             <h3><?php echo $name; ?></h3><input type="checkbox" name="exercheckbox" id="exercheckbox" value="1">              <input type="hidden" name="reps<?php echo $x ?>" value = "0" autocomplete="off" required />             <input type="hidden" name="sets<?php echo $x ?>" value = "0" autocomplete="off" required />             <input type="hidden" name="weight<?php echo $x ?>" value = "0" autocomplete="off" required />             <label id="reps">reps: </label><input type="text" name="reps<?php echo $x ?>" id="reps">             <h4 id="sets">sets: </h4><input type="text" name="sets<?php echo $x ?>" id="sets">             <h4 id="weight">weight: </h4><input type="text" name="weight<?php echo $x ?>" id="weight">         </div>     </form>      </div>   </body> 

i guess need change css increase width of login panel , width of textbox. textbox cannot 100% of form if want inline label. if put 100% take full width of parent

.login {      position: absolute;     top: 43%; /* form 45% top */     left: 50%; /* form 50% across screen*/     margin: -150px 0 0 -150px; /* position of form on screen */     width:500px; /* width of form */     height:300px; /* height of form */     border: 5px; }  .login input {     width: 250px;     margin-bottom: 10px; /* gap in between each element */     background-color: rgba(0,0,0,0.5); /* background color (opacity 3) of input elements in login class*/     border: none; /* border of input elements in login class */     outline: none;     padding: 10px; /* height of each input element in login class*/     font-size: 13px; /* font size */     color: #fff; /* font color */     border: 1px solid rgba(0,0,0,0.2); /* 1 pixel black border of opacity 2 each input element in login*/     border-radius: 4px; /* can curve login details elements */ } 

Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -