html - Email-box shows at "random" place -
html - Email-box shows at "random" place -
i'm busy informatics project(build sample datingsite) of mine. problem i'm having troubles getting in right place. went fine until email-box showed @ wrong place(however, dreamweaver displays want it). don't know how, don't know why think has margins or paddings. help appreciated!
thanks in advance,
html+css(many words dutch , beginner all, please don't expect high quality code. have html , css in separate files in real project.):
<!doctype html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>untitled document</title> <style type="text/css"> * { padding:0; margin:0; border:0; } body { background-color:#666; font-family:corbel; } .container { width: 1240px; } #homeleftsideregister { float:left; } .form { width: 1240px; height: 600px; display:block; background-color:white; border-radius: 10px; margin-top: 111px; margin-left:auto; margin-right:auto; } #registreernu { margin-left:45px; color: #3c948b; font-size: 70px; } #home-email { color: #000; font-size: 30px; margin-top: 30px; margin-left: 245px; } .email { color:#666; font-weight:bold; } #useremail { height: 22px; width: 281px; font-size: 20px; border-width: 1px; border-style:solid; margin: 10px 0px 10px 149px; } .gender { color: #000; font-size: 18px; height: 155px; width: 130px; border: none; float: left; margin-left: 25px; margin-top: 10px; } #gender-1 { margin-left:150px; } .radiolabel { margin-top: 20px; } .roundbutton { background-color: #3c948b; height: 74px; width: 196px; border-radius: 10px; color: white; font-size: 25px; font-weight: 500; float:none; margin-left:193px; } #input { margin-top: 220px; } #blousemanimage { float:right; margin: 44px 70px auto auto; } </style> </head> <body> <div id="content" class="container"> <section id="home-register"> <form class="form" action="#" > <div id="homeleftsideregister"> <div id="registreernu">registreer nu</div> <h2 id="home-email">email:</h2> <input name="email" type="email" class="email" id="useremail"/> <fieldset class="gender" id="gender-1"> <h3>ik ben een:</h3> <div class="radiolabel"> <label> <input type="radio" name="amman" class="styled-radio" value="man"/> man </label> <br /> <label> <input type="radio" name="amvrouw" class="styled-radio" value="vrouw"/> vrouw </label> </div> </fieldset> <fieldset class="gender"> <h3 class="">ik zoek een:</h3> <div class="radiolabel"> <label> <input type="radio" name="likeman" class="styled-radio" value="man"/> man </label> <br /> <label> <input type="radio" name="likevrouw" class="styled-radio" value="vrouw"/> vrouw </label> <br /> <label> <input type="radio" name="likebeide" class="styled-radio" value="beide"/> beide </label> </div> </fieldset> <div id="input"> <input type="submit" value="ga verder" class="roundbutton"> </div> </div> <div id="blousemanimage"><img src="images/man_registreer.jpg" alt="ik probeer het gewoon" height="535" width="577" /> </div> </form> </section> <section id="reclame"> </section> </div> </body> </html>
it seems you're victim of 'float' rule :-)
your .gender divs have float: left , makes these divs go left , email field had appear right.
i solved making email field float, gets there first... also, had separate 2 divs gender because different , 1 needed clear float above goes row below.
also, html had have name 2 separated div classes, genderben , genderzoek. (i don't know dutch presume stands , you're looking :-d)
the modified code is:
.email { color:#666; font-weight:bold; float: left; } .genderben { color: #000; font-size: 18px; height: 155px; width: 130px; border: none; float: left; clear: both; margin-left: 25px; margin-top: 10px; } .genderzoek { color: #000; font-size: 18px; height: 155px; width: 130px; border: none; float: left; margin-left: 25px; margin-top: 10px; } and html changed divs:
<fieldset class="genderben" id="gender-1"> <h3>ik ben een:</h3> <div class="radiolabel"> <label> <input type="radio" name="amman" class="styled-radio" value="man"/> man </label> <br /> <label> <input type="radio" name="amvrouw" class="styled-radio" value="vrouw"/> vrouw </label> </div> </fieldset> <fieldset class="genderzoek"> <h3 class="">ik zoek een:</h3> <div class="radiolabel"> <label> <input type="radio" name="likeman" class="styled-radio" value="man"/> man </label> <br /> <label> <input type="radio" name="likevrouw" class="styled-radio" value="vrouw"/> vrouw </label> <br /> <label> <input type="radio" name="likebeide" class="styled-radio" value="beide"/> beide </label> </div> </fieldset> check result here http://jsfiddle.net/yn8bjfbf/
html css textbox margin padding
Comments
Post a Comment