html - Textarea inside table cell doesn't resize to cell height under Firefox -


when place textarea inside table cell...

<table style="height:200px">     <tr>         <td>some<br>nifty<br>text<br>filler</td>         <td style="padding:0px">             <div style="height:100% !important">                 <textarea style="resize:none; height:100% !important; width:100% !important" data-ng-model="modellogin.inpmtext">             </div>         </td>     </tr> </table> 

...and take care make sure both textarea , containing div have important height of 100%... textarea indeed covers cell's height under chrome, not under firefox.

any idea why and/or how fix situation under firefox?

mozilla right! assign textarea's height of 100% of it's parent. , it's parent (div) 100% of parent (td) height. td height undefined, can't stretch feet whole height. [one might think td's height = table's height, assumption not quite right] fix it, have assign 100% height so:

<td style="height:100%"> 

the rule simple: if apply width/height/margins in percents, make sure browser has benchmark calculate (every parent until final height has have it's height).

if doesn't help, add display:block textarea (not quite sure it's needed) and... can delete these nasty inline styles multiple !importants :-)


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -