dstonek
dstonek

Reputation: 975

Is there something like an auto line-height?

I have a box in CSS with fixed dimensions, enough to fit any of my texts. I don't want white space between the end of the text and the bottom box border. How can I fit them into the boxes? Something like expanding the line-height to fit.

Upvotes: 33

Views: 27748

Answers (3)

httpete
httpete

Reputation: 2973

line-height: normal;

Is correct.

Upvotes: 25

Maxim Pokrovskii
Maxim Pokrovskii

Reputation: 353

Sorry, but it's that possible only with JavaScript.

Upvotes: -5

Niet the Dark Absol
Niet the Dark Absol

Reputation: 324610

Try vertical-align:bottom.

If that doesn't work, you can try line-height: 1em

If that still doesn't do what you want, you'll have to clarify further what you're trying to achieve.

Upvotes: 5

Related Questions