开发者

Persistant padding on a text that wraps?

开发者 https://www.devze.com 2023-03-15 11:04 出处:网络
I\'m wondering if this is possible: A container has a line of text in it, it can wrap to a new line if it\'s too long

I'm wondering if this is possible:

  • A container has a line of text in it, it can wrap to a new line if it's too long
  • The line of text has padding around it and also has a background color
  • The padding is consiste开发者_StackOverflow社区nt until the text wraps, the first line will not have padding on the right side of the first line

How can you keep the padding on the right side of the first line? Please note I do not want a large block of black that runs straight down from the widest line.

Here is a jsfiddle in case you need to see an example: http://jsfiddle.net/x6Rxw/

Thanks!


Sorry for bringing this topic back up- however this post may be helpful to future people looking.

This is a jQuery + CSS fix for this issue in a plugin form.

http://jsfiddle.net/OwenMelbz/rd8Qc/

0

精彩评论

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