div table overflow not working as intended on mobile
<p>I have a div table layout where the table serves as a size comparison chart. The background of the table is made up of grid lines of varying heights and the table contains three cells: an empty left hand cell that serves as a buffer space to see the left-handed legend denoting the height values, a middle cell with the first item's image set with a class that tells it how tall it is in the table and the rightmost cell showing a second image set with a class telling it what scale it should be in the table.</p>

<p>I have this working fairly well in a static table:</p>

<p>HTML</p>

<pre><code>&lt;div id="scalechart"&gt;
  &lt;div id="buffer"&gt;&lt;/div&gt;
  &lt;div id="nochoice"&gt;
    &lt;img src="http://www.example.com/image1.png" class="leader"&gt;
  &lt;/div&gt;
  &lt;div id="firstchoice"&gt;
    &lt;img src="http://www.example.com/image2.png" class="leader"&gt;
  &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>CSS</p>

<pre><code>#scalechart {
  display: block;
  width: 100%;
  border: 2px solid grey;
  height: 500px;
  background: url(../../legend.png) no-repeat, url(../../Gridlines.png) repeat-x;
  background-size: contain;
  clear: both;
  white-space: nowrap;
}

#buffer {
  width: 144px;
  position: relative;
  display: inline-block;
  height: 100%;
}

#nochoice, #firstchoice {
    display: inline-block;
    vertical-align: bottom;
    text-align: center;
}

.leader {
  height: 381px;
}
</code></pre>

<p>This works pretty darn well on mobile screens except for one thing:</p>

<p>The table border (and background) only appears around the initial width of the phone screen. In other words, the width on the table doesn't wrap around the contents on the cells so when the user scrolls to the side, the background is white and the border edge slides to the side.</p>

<p>I believe my question t be simple: How can I get the table border (and background) to surround the cell contents so that the user sees the gridlines through the entire width of the table?</p>

<p>Pointers are appreciated. If you're going to down vote, have the nerve to explain why. Thank you. </p>