box model is something every web developer should be aware of. working with percentages for sizes and pixels for fill / fields just doesn't work. There is always a resolution at which it does not look very good (for example, setting the width to 90% and filling / edge 10px in a div with a width of less than 100 pixels).
Check this out (using micro.pravi code): http://jsbin.com/umeduh/2
<div id="container"> <div class="left"> <div class="content"> left </div> </div> <div class="right"> <div class="content"> right <textarea>Check me out!</textarea> </div> </div> </div>
<div class="content"> , so you can use padding and margins without twisting the floats.
this is the most important part of CSS:
textarea { display: block; width: 100%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
Broxzier Jun 20 '13 at 9:39 on 2013-06-20 09:39
source share