Goal: Just show the first four lines in a text box.
I tested JSFiddle Demo with Chrome 43.0.2357.132 (64-bit) and Firefox 39 and in Chrome the text box shows perfectly the first 4 lines (remaining lines are hidden) whereas in Firefox the line-height appears larger, therefore the fourth line got cut.
How can I solve this with CSS?
.txt { width:300px; height:48px; overflow:hidden; border-bottom-style:solid; border-bottom-width:1px; border-bottom-color:#aaaaaa; margin-bottom:2em; font-size:0.8em; } <div class="txt"> This is just a temporary text. This is just a temporary text. This is just a temporary text. This is just a temporary text. This is just a temporary text. This is just a temporary text. This is just a temporary text. This is just a temporary text. This is just a temporary text. This is just a temporary text. This is just a temporary text. This is just a temporary text. This is just a temporary text. This is just a temporary text. </div>
px, but a font-size inem. You might want to declare the line-height to (making it overrule any default value, if given).