开发者

Stretching text in div

I have a div w开发者_StackOverflowith 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 ?


You could do something like this.

text-align:justify your p tag


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

letter-spacing


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;
}


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜