To display lines with line-numbers I use for each line the following template:
<div><span style="display: inline-block;width: 50px;">1</span><span>line1</span></div>
<div><span style="display: inline-block;width: 50px;">2</span><span>line2</span></div>
The issue with this solution is that when I select by mouse, I am getting also line-numbers. Can you please let me know to change above code so that only line1 & line2 will be selected and copied to clipboard.
Can I do it by using CSS/HTML, or more advanced approach (js / jquery) is required?
regards, M.