次の画像のボタンをボトムに合わせようとしていますが、私は多くのトリックを試しましたが、何もそれを壊すことなく動作するようです。ボタンは固定スペースを占有し、テキストエリアは残りのスペースを埋めるものです。 codepenの例を追加しました!ボタンをボトムに合わせる(フロート)
フレックスボックス以外の回答(9+)を希望しますか?また、バニラCSSではなく、プリプロセッサとしてのみLESS。
HTML:
<div class="wrapper">
<div class="text">
<div class="right">
<button>submit</button>
</div>
<div class="left">
<textarea></textarea>
</div>
</div>
</div>
<script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
CSS:
body, html {
margin: 0;
}
.wrapper {
position: fixed;
bottom: 0;
width: 100%;
background: green;
}
.text {
width: 800px;
margin: 0 auto;
background: red;
}
.right {
float: right;
padding-left: 10px;
height: 100%;
background: gray;
}
textarea {
width: 100%;
height: 200px;
box-sizing: border-box;
}
.left {
overflow: auto;
padding: 10px;
}
JS:
tinymce.init({
selector: 'textarea',
theme: 'modern',
width: '100%',
height: 50,
autoresize_min_height: 50,
menubar: false, // removes top menubar,
statusbar: false, // removes bottom statusbar
toolbar: 'undo redo | bold italic | link image',
plugins: ['image autoresize'],
automatic_uploads: false,
});
http://codepen.io/basickarl/pen/Megjyb
Doh!私は1 +あなたの努力のために、それはいくつかの他の悪い魂を助けるかもしれない:)フレックスボックス(ie9 +、私は間違いなくこれを言及することを忘れている)を忘れてください:) –