Luc
Luc

Reputation: 17082

Stretching text in div

I have a div with width set to 500px.
I want the text to be stretched so that it can fit the whole div.
How can this be achieved (if possible) in css ?

Upvotes: 0

Views: 1993

Answers (4)

Luc
Luc

Reputation: 17082

I have found what I was looking for. I can achieve the stretching with the css property:

letter-spacing

Upvotes: 1

breezy
breezy

Reputation: 1918

You could do something like this.

text-align:justify your p tag

Upvotes: 1

Dan
Dan

Reputation: 2093

Unfortunately, I don't think you can do that with CSS.

Upvotes: 0

bfontaine
bfontaine

Reputation: 19859

Set padding to 0:

div {padding: 0}

If there is something in your div, like <div><p>...</p></div>, add:

div > p {
    padding:0;
    margin:0;
}

Upvotes: 0

Related Questions