<div> background got cut

obleceni

New Member
I wanna highlight some lines in a \[code\]<div>\[/code\].
Some lines are longer than the width of the \[code\]<div>\[/code\], so I use \[code\]<div style="overflow:scroll;">\[/code\].
However, when I scroll to the right, the highlighted background is cut at the right edge, so text longer than the \[code\]<div>\[/code\]'s width has no background.
Sxk4A.png
\[code\]<style>.a { background-color:red; }.b { background-color:yellow; }</style><div style="overflow:scroll;width:49%;height:100%;border:1px solid silver;white-space:nowrap;"><pre><div class="a">ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdffdgfdsgfg</div><div class="b">asdsad</div></pre></div>\[/code\]
Can anyone fix this?
 
Back
Top