2つのテキストタグをテキスト領域フィールドの横に配置し、そのテキスト領域フィールドの中央に垂直に配置したいと思います。
やってみた
と
http://www.jakpsatweb.cz/css/css-vertical-center-solution.html
しかし、役に立たない。
両方の試みからのコードを投稿します-
試行1-
HTML-
<div class="optionGroup">
<div class="response">
<div class="outer">
<div class="middle">
<div class="inner">
<textarea class="correctResponse"></textarea>
<text class="closeButton centerVertically">✖</text>
<text class="addButton centerVertically">+</text>
</div>
</div>
</div>
CSS-
.outer{
display:table;
position:static;
}
.middle{
display:table-cell;
vertical-align:middle;
width:100%;
}
試行2-
HTML-
<textarea class="correctResponse"></textarea>
<text class="closeButton centerVertically">✖</text>
<text class="addButton centerVertically">+</text>
CSS-
.centerVertically{
line-height:100%;
vertical-align:middle;
}
どこが間違っているのですか?2つのテキストタグがテキストエリアの横に表示され、テキストエリアの上部から垂直方向に半分下がるようにするにはどうすればよいですか?
ありがとう。