0

I want to decrease the text height without changing its font size,how I can achieve that? I already tried by applying line-height property but didn't got any solution. Thanks

  • possible duplicate of [Is it possible to change the font height, not just the line-height?](http://stackoverflow.com/questions/942995/is-it-possible-to-change-the-font-height-not-just-the-line-height) – Pete Mar 06 '15 at 13:22

2 Answers2

0

use css3 transoformations to scale the element that holds the text:

#skewed{
    font-size:50px;
    -webkit-transform-origin:0 0;
    -webkit-transform:scale(4,0.5);
    -moz-transform-origin:0 0;
    -moz-transform:scale(4,0.5);
    transform-origin:0 0;
    transform:scale(4,0.5);
}
<p id="skewed">Banana</p>
Banana
  • 7,424
  • 3
  • 22
  • 43
-1

You should clarify you question. If you want to place a text in less space you can simply decrease line height for example:

<p>
 Lorem ipsum dolor sit amet, ad dicant appareat sea, no nibh iusto sea
 .No veritus omittam has, has maiorum splendide ne. Per mandamus
 repudiandae in, pri suas aperiam cu, quando meliore liberavisse
 nec te.Graeco sanctus convenire ne mea, dicant intellegebat an 
 pri, quo ex iusto evertitur theophrastus. Id usu placerat 
 consectetuer, alii feugait eam an, his no debitis dissentias.
</p>

p {
    line-height: 0.7 /* replace 0.7 with the valuse that best suites you need*/
}
loop
  • 21
  • 2