html - Aligning inputs ontop & next to eachover -
i trying align 2 inputs on top of eachover next 2 inputs on top of each other. here keeps giving me:
it seems have no problems 2 of them, 2 next them doesn't want work.
here style them:
css:
.loginbutton { font-family: 'nunito'; color: #fff; font-size: 16px; background-image: url(../images/gradient.png); background-position: 0, center; display: inline-block; background-color: #81bb0f; height: 71px; width: 100px; margin-left: 10px; box-shadow:0 0 0 1px rgba(0,0,0,.25) inset,0 0 0 2px rgba(255,255,255,.25) inset; border: 1px solid #919191; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 2px; padding: 10px }
html:
<form method="post" id="phase-0-form"> <input type="text" id="habbo-name" placeholder="username" size="35" value="<?php echo $template->form->reg_username; ?>" name="reg_username" class="logintext" maxlength="32"> <input type="text" id="email" size="35" placeholder="email" name="reg_email" value="<?php echo $template->form->reg_email; ?>" class="logintext" maxlength="48"><br> <input type="password" id="password" placeholder="password" size="35" name="reg_password" value="" class="logintext" maxlength="32" style="float: left;"> <input type="password" id="password2" placeholder="confirm password" size="35" name="reg_rep_password" value="" class="logintext" maxlength="32"> <input type="password" id="seckey" size="35" placeholder="security key" name="reg_seckey" value="1111" hidden="yes" class="text-field" maxlength="4" > <button type="submit" name="register" class="loginbutton" style="float: right">register now</button> </form>
you had float: right
in css (in input.logintext) - messing up.
i removed style="float: left;"
password input not required
update: i've re-ordered fields , added buttons divs
html:
<div id="logincontainer"> <form method="post" id="phase-0-form"> <div style="float:left;"> <a href="index"><div class="regbutton">go index</div></a> </div> <div style="float:left;"> <input type="text" id="habbo-name" placeholder="username" size="35" value="<?php echo $template->form->reg_username; ?>" name="reg_username" class="logintext" maxlength="32" /><br /> <input type="password" id="password" placeholder="password" size="35" name="reg_password" value="" class="logintext" maxlength="32" /> </div> <div style="float:left;"> <input type="text" id="email" size="35" placeholder="email" name="reg_email" value="<?php echo $template->form->reg_email; ?>" class="logintext" maxlength="48" /><br /> <input type="password" id="password2" placeholder="confirm password" size="35" name="reg_rep_password" value="" class="logintext" maxlength="32" /> <input type="password" id="seckey" size="35" placeholder="security key" name="reg_seckey" value="1111" hidden="yes" class="text-field" maxlength="4" /> </div> <div style="float:left;"> <button type="submit" name="register" class="loginbutton">register now</button> </div> </form> </div> <div id="container"> <div class="image"></div> </div>
css:
@import url(http://fonts.googleapis.com/css?family=lato); @import url(http://fonts.googleapis.com/css?family=ubuntu); @import url(http://fonts.googleapis.com/css?family=nunito); body { background: url(../images/bg2.png) repeat-x bottom fixed; background-color: #3aa4e2; font-family:'lato'; margin-top: 70px; } #container { display: block; top: 0; left: 0; bottom: 0; right: 0; margin: auto; height: 371px; width: 780px; border: 1px solid #919191; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; background-color: #fff; padding: 10px; margin-top: 10px } input.logintext { width: 180px; height: 12px; padding: 10px; border: 1px solid #919191; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 2px; } .loginbutton { font-family:'nunito'; color: #fff; font-size: 16px; background-image: url(../images/gradient.png); background-position: 0, center; display: inline-block; background-color: #81bb0f; height: 71px; width: 100px; margin-left: 10px; box-shadow:0 0 0 1px rgba(0, 0, 0, .25) inset, 0 0 0 2px rgba(255, 255, 255, .25) inset; border: 1px solid #919191; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 2px; padding: 10px } .regbutton { text-align: center; font-family:'nunito'; color: #fff; font-size: 16px; background-image: url(../images/gradient.png); background-position: 0, center; float: left; display: inline-block; background-color: #e70505; height: 37px; margin-right: 21px; width: 100px; box-shadow:0 0 0 1px rgba(0, 0, 0, .25) inset, 0 0 0 2px rgba(255, 255, 255, .25) inset; border: 1px solid #919191; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 2px; padding: 16px } .fbbutton { text-align: center; font-family:'nunito'; color: #fff; font-size: 16px; background-image: url(../images/gradient.png); background-position: 0, center; float: left; display: inline-block; background-color: #3b5998; height: 37px; width: 100px; box-shadow:0 0 0 1px rgba(0, 0, 0, .25) inset, 0 0 0 2px rgba(255, 255, 255, .25) inset; border: 1px solid #919191; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 2px; padding: 16px; margin-right: 10px } .usersonline { text-align: center; font-family:'nunito'; color: #919191; font-size: 16px; background-image: url(../images/gradient.png); background-position: 0, center; float: left; display: inline-block; background-color: #e6e6e6; height: 37px; margin-right: 21px; width: 100px; box-shadow:0 0 0 1px rgba(0, 0, 0, .25) inset, 0 0 0 2px rgba(255, 255, 255, .25) inset; border: 1px solid #919191; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 2px; padding: 16px } .loginbutton:hover, .regbutton:hover, .fbbutton:hover, .usersonline:hover { opacity: 0.8; } #logincontainer { top: 0; left: 0; bottom: 0; right: 0; margin: auto; border: 1px solid #919191; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; background-color: #fff; padding: 10px; height: 70px; width: 780px; } .image { background: url(../images/mainimg2.png); height: 371px; width: 780px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; }
Comments
Post a Comment