Constantly filling text that wraps around?

I am wondering if this is possible:

  • There is a line of text in the container, it can wrap to a new line if it is too long
  • A line of text is indented around it and also has a background color
  • The padding is consistent until the text wraps around, the first line will not have padding on the right side of the first line

How can you keep padding on the right side of the first line? Please note, I don't want the big black block to work right along the widest line.

Here's a jsfiddle if you need to see an example: http://jsfiddle.net/x6Rxw/

Thank!

+1


source to share


1 answer


Sorry for bringing this thread back, but this post may be helpful for future people.

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



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

+1


source







All Articles