how to stretch a full-width div in an overflow-x div c: scroll
html:
<div class="p1"> <p>204204204200420424204204204420420420420420420000420</p> <div class="p2"></div> </div>
css:
.p1 {width:300px; height: 200px; border: 1px solid #000; overflow-x: scroll;} .p2 {height: 30px; background: #902457; display: block;}
the same here: http://jsfiddle.net/2ghb3ahc/12/
in the end, it can be seen that the crimson block does not stretch to the full width inside the div, but takes the width of the parent, how to stretch it to the entire width? without resorting to wight with px values, since the length of the text will vary, and wight 100% does not help