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>