Ben
Ben

Reputation: 317

Enlarge text height?

I have text with font-size 18 and it is displayed in a block style. I would like to increase the text's "height," in other words, increase how much vertical space the text takes up alone. I don't want to increase the font size in order to do this. Any suggestions?

Upvotes: 1

Views: 84

Answers (3)

Kai Feller
Kai Feller

Reputation: 663

You could use the transform property and scale the height vertically:

CSS

.stretch {
    transform : scale(1,5);
    -webkit-transform:scale(1,5); /* Safari and Chrome */
    -moz-transform:scale(1,5); /* Firefox */
    -ms-transform:scale(1,5); /* IE 9+ */
    -o-transform:scale(1,5); /* Opera */
}

Check out this Fiddle.

Upvotes: 1

Ivozor
Ivozor

Reputation: 976

Have you tried transform? In particular for your case:

-webkit-transform:scale(1,5); /* webkit */
-moz-transform:scale(1,5); /* gecko */
-o-transform:scale(1,5); /* opera */
transform:scale(1,5);

As explained here: http://www.css3files.com/transform/#scale

Upvotes: 0

felipekm
felipekm

Reputation: 2910

What about line-height Property ?

p.small {line-height:90%}
p.big {line-height:200%}

Source: http://www.w3schools.com/cssref/pr_dim_line-height.asp

Hope this helps.

Upvotes: 1

Related Questions