I am trying to customize a custom toolbar for a text box, I have the following
HTML
<div id="main"> <div id="toolbar"></div> <textarea></textarea> </div>
CSS
#main { background-color: #ddd; height: 400px; width: 400px; position: relative; } #toolbar { background-color: #444; height: 40px; color: white; } textarea { outline: none; border: none; border-left: 1px solid #777; border-right: 1px solid #777; border-bottom: 1px solid #777; margin: 0; position: absolute; top: 40px; bottom: 0; left: 0; right: 0; }
It works exactly the same as I expected in Chrome, but in firefox / i.e.. the text area does not consume all the available space in the div.
How to configure it so that the toolbar occupies 40 pixels at the top of the div, and the text area consumes the rest of the height.
I am dynamically changing this material, so I cannot use the height or width of the "px" for the text field .
Codepen is here: http://codepen.io/anon/pen/pDgvq
source share