Please have a look at this form that I am trying to design with not much luck. Let me say that I come from a tables world and am really trying to learn this css stuff. Because I have used tables for so long, I guess I'm expecting the same results. For example, if I write a row of data then start a new row, the bottom row will never move from where it is; that is that unlike css, the contents of the rows stay put.
Now, in this case, I'm expecting the same behavior but what I'm getting are these boxes that are jumping up and every which way. All I am trying to do here is to put 2 input boxes side by side and another below it. What happens is that the last row jumps up. I have to maintain a hight attribute on the box on the right in order to push the next box down.
I am including all of the css and if you view it in your browser, you will hopefully see these boxes as I intend them to be.
#passage .input-right {
border:1px solid #888;
height:22px; <----------------------If you change this to something lower, the bottom box jumps up.
width:99%;
margin:0;
padding:0;
}
Here is all of the code.
<style>
#passage {
width:90%;
height:350px;
border:0px solid #000;
color:black;
margin:auto;
}
#passage p {
font-size:11px;
}
#passage span.left {
float:left;
width:49%;
border:0px solid #000;
}
#passage span.right {
float:right;
width:49%;
border:0px solid #000;
}
#passage .select-left {
border:1px solid #888;
height:21px;
width:99%;
margin:0;
padding:0;
}
#passage .input-right {
border:1px solid #888;
height:22px;
width:99%;
margin:0;
padding:0;
}
#passage div#submit {
float:left;
width:100%;
border:0px solid #000;
margin-top:20px;
}
</style>
<div id="passage">
<span class="left">
Book<br />
<select class="select-left" name="book">
<option value="">Select..</option>
</select>
</span>
<span class="right">
Chapter<br />
<input type="text" class="input-right" name="chapter-verse" />
</span>
<span class="left">
Translation<br />
<select class="select-left" name="translation">
<option value="">Select...</option>
</select>
</span>
<div id="submit">
<form method="post" action="">
<div>
<input type="submit" value="submit" name="search" />
</div>
</form>
</div>
</div>