У меня возникает проблема при выравнивании элемента внутри div.проблема с выравниванием внутри div
Я хочу что-то вроде этого
|-----------------------------------------------|
|<P> | <input type = text> | imagebutton here |
|here | here | |
|-----------------------------------------------|
Но я получаю что-то вроде
|-----------------------------------------------|
|<P> | |
|here | |
| <input type = text> | |
| here | |
| imagebutton here |
|-----------------------------------------------|
Так что есть какой-то вопрос, что сделать следующий элемент в div
будет отображаться ниже текущего элемента, т.е. если Я могу выровнять <input>
по горизонтали до <p>
, я думаю, что это даст решение.
Ниже моя попытка:
CSS часть
.imagewrapper{
display: table-cell;
background-color:yellow;
margin-left: 70%;
width: 25%;
margin-bottom: 10%;
height: 35%;
}
.textwrapper{
display: table-cell;
background-color:blue;
margin-left: 30%;
width: 40%;
margin-bottom: 10%;
height: 35%;
}
.msg_wrapper{
display: table-cell;
background-color:lime;
margin-left:5%;
width: 25%;
margin-bottom: 10%;
}
HTML сторона
<div id="searchClass">
<p class="msg_wrapper"><b>Class</b></p>
<input id="txt_class" style="background-color: Aqua; class = textwrapper >
<input type="image" id="searchclassimg" class="imagewrapper" src="./resource/search-button.png">
</div>
всплывающие окна, вы можете удалить их, они стали бесполезными :) –