html - How to add an image in the end of every wrapped line? -


assuming have div container contains multiline text , of these lines wrapped.

is possible add image indicate particular line wrapped, not line separated <br>?

a desired sample notepad++:

enter image description here

a sandbox: http://jsfiddle.net/yl9gu/

i doubt can done without changing brs divs because seems brs hard style:

can target <br /> css?

here simple pure css solution requires brs changed divs (possibly javascript):

#text {     border: 1px solid black;     width: 300px; } #text div {     line-height: 16px;     background: url(http://cdn.sstatic.net/stackoverflow/img/favicon.ico);     background-repeat: repeat-y;     background-position: right top; } #text div:after {     float: right;     width: 16px;     height: 16px;     background-color: white;     content: " "; } 

http://jsfiddle.net/qvn4l/3/

if can satisfied js solution maybe here help:

detecting line-breaks jquery?


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -