我尝试将我的下拉列表与左侧的textarea垂直对齐。我不知道它为什么会在一起发生冲突。如何在左右两边垂直对齐两个div?
编辑:感谢您的帮助,我做出了改变,实现它。
JSP:
.ExeDropdown{
\t float:left;
margin-left:50px;
}
div.txt1{
float: left;
margin-left:50px;
}
div.txt2{
float:right;
margin-right: 120px;
}
.txt3{
\t float:right;
\t margin-right: 120px;
}
#subBtn{
\t position: absolute;
bottom: 20%;
left:47%;
}
<div class="ExeDropdown">
Select an exercise:
<select name="ProgExe">
<option value="exe1">Exercise 1</option>
<option value="exe2">Exercise 2</option>
</select>
</div>
<div class="txt1" >
<p>Write your source code here:</p>
<textarea id="myTextArea" rows="5" cols="40" name="txtInput" >
</textarea>
</div>
https://i.stack.imgur.com/Vok8d.jpg
你能更具体? –
我想我的div.exedropdown高于我的div.txt1左对齐 –
蒂姆,它的工作? –