CSS: form layout problem using divs[SOLVED]
Posted: Thu Oct 13, 2005 10:14 am
If you run this, you will see inspite of the first spans having a width of 100px they do not expand and stand close to the elements that come next to them.
Code: Select all
<div style="margin-top:20px; margin-left:50px; margin-right:30px; ">
<form name="frmFeedback" method="post" action="">
<div><span style="width:100px; ">Name</span><span style="color:#990000;">*</span> <input type="text" name="name" value="<?php echo $_POST["name"] ?>" /></div>
<div><span style="width:100px; ">Organisation</span><span style="color:#990000;">*</span> <input type="text" name="organisation" value="<?php echo $_POST["organisation"] ?>" /></div>
<div><span style="width:100px; ">Email</span> <input type="text" name="email" value="<?php echo $_POST["email"] ?>" /></div>
<div><span style="width:100px; ">Phone</span> <input type="text" name="phone" value="<?php echo $_POST["phone"] ?>" /></div>
<div><span style="width:100px; ">Project Title</span> <input type="text" name="project_title" value="<?php echo $_POST["project_title"] ?>" /></div>
<div><span style="width:100px; ">Comments</span><span style="color:#990000;">*</span> <textarea name="comments" rows="5" cols="40"> <?php echo $_POST["comments"] ?> </textarea></div>
<div><span style="width:100px; "></span><span><input type="submit" name="subFeedback" value="Submit Feedback" class="button" /></span></div>
</form>
</div>