User
User

Reputation: 30985

How to increase spacing between lines in CSS?

I have something similar to that:

<table>
    <tr>
        <td>Hello,<br/>World!</td>
    </tr>
</table>

Both lines

Hello,
World!

are displayed too close to one another. Any way to increase spacing between them (by a portion of a line width (without another <br/>))?

Upvotes: 14

Views: 39995

Answers (3)

RichieHindle
RichieHindle

Reputation: 281835

Here's a full example of how to make the line spacing within <td>s one and a half times the height of the font:

<html><head>
<style>
td {
    line-height: 150%;
}
</style>
</head>
<body>
<table>
    <tr>
        <td>Hello,<br/>World!</td>
    </tr>
</table>
</body></html>

Upvotes: 15

Aiden Bell
Aiden Bell

Reputation: 28384

td {
    line-height:<value>;
}

Upvotes: 4

Gumbo
Gumbo

Reputation: 655755

Use line-height to adjust the, well, line height. So in your case line-height: 2 will double the line height.

Upvotes: 13

Related Questions