Thanks for the suggestion, Mike, but the property I really need to would probably be
column-break-inside: avoid (or, in the CSS recommendation, break-inside: avoid). Because there are times when I don't want the tables to start at the top of a column; I just don't want them to break across columns if it can be avoided.
The problem I am seeing is how column breaks are handled where a table is longer than 1 column. The problem appears in both 6. and 7.1
Below is a sample, which I think I have reduced to the bare necessities. (BTW, how do you attach files here? It rejected .html and .txt)
Table 1 is more than 1 column long.
Table 2 is less than 1 column, as is Table 3. Indeed, Tables 2 & 3 can fit in 1 column. Table 4 is another long one.
What I would like to have happen is Table 1 (the long one) lays out across columns 1 & 2 of a page, then Tables 2 and 3 are both in the first column of page 2. Then Table 4 running from p2/c2 to p3/c1. But I can't make that happen!
If I use
table {page-break-inside: auto} the result looks a mess.
But if I put
table {page-break-inside: avoid} Table 1 (mysteriously) starts in column 2. Tables 2 & 3 do what I expect, and Table 4 does too.
So what is happening with Table 1? How can I make it start in column 1?
I should point out that in the real documents, the number and length of these tables can vary markedly, so I really don't want to have a special <table class="first-in-section">
<html>
<head>
<style>
div.subsection {
column-count: 2;
page-break-inside: auto;
column-fill: auto;
}
table {
page-break-inside: avoid;
}
th {
background-color: yellow;
}
td {
border: 1px solid red;
}
</style>
</head>
<body>
<div class="subsection">
<h3>Tables subsection</h3>
<table>
<thead>
<tr><th>Table 1: more than 1 column long</th></tr>
</thead>
<tbody>
<tr><td>Row 1</td></tr>
<tr><td>Row 2</td></tr>
<tr><td>Row 3</td></tr>
<tr><td>Row 4</td></tr>
<tr><td>Row 5</td></tr>
<tr><td>Row 6</td></tr>
<tr><td>Row 7</td></tr>
<tr><td>Row 8</td></tr>
<tr><td>Row 9</td></tr>
<tr><td>Row 10</td></tr>
<tr><td>Row 11</td></tr>
<tr><td>Row 12</td></tr>
<tr><td>Row 13</td></tr>
<tr><td>Row 14</td></tr>
<tr><td>Row 15</td></tr>
<tr><td>Row 16</td></tr>
<tr><td>Row 17</td></tr>
<tr><td>Row 18</td></tr>
<tr><td>Row 19</td></tr>
<tr><td>Row 20</td></tr>
<tr><td>Row 21</td></tr>
<tr><td>Row 22</td></tr>
<tr><td>Row 23</td></tr>
<tr><td>Row 24</td></tr>
<tr><td>Row 25</td></tr>
<tr><td>Row 26</td></tr>
<tr><td>Row 27</td></tr>
<tr><td>Row 28</td></tr>
<tr><td>Row 29</td></tr>
<tr><td>Row 30</td></tr>
<tr><td>Row 31</td></tr>
<tr><td>Row 32</td></tr>
<tr><td>Row 33</td></tr>
<tr><td>Row 34</td></tr>
<tr><td>Row 35</td></tr>
<tr><td>Row 36</td></tr>
<tr><td>Row 37</td></tr>
<tr><td>Row 38</td></tr>
<tr><td>Row 39</td></tr>
<tr><td>Row 40</td></tr>
<tr><td>Row 41</td></tr>
<tr><td>Row 42</td></tr>
<tr><td>Row 43</td></tr>
<tr><td>Row 44</td></tr>
<tr><td>Row 45</td></tr>
<tr><td>Row 46</td></tr>
<tr><td>Row 47</td></tr>
<tr><td>Row 48</td></tr>
<tr><td>Row 49</td></tr>
<tr><td>Row 50</td></tr>
<tr><td>Row 51</td></tr>
<tr><td>Row 52</td></tr>
<tr><td>Row 53</td></tr>
<tr><td>Row 54</td></tr>
<tr><td>Row 55</td></tr>
<tr><td>Row 56</td></tr>
<tr><td>Row 57</td></tr>
<tr><td>Row 58</td></tr>
<tr><td>Row 59</td></tr>
<tr><td>Row 60</td></tr>
</tbody>
</table>
<table>
<thead>
<tr><th>Table 2: shorter</th></tr>
</thead>
<tbody>
<tr><td>Row 1</td></tr>
<tr><td>Row 2</td></tr>
<tr><td>Row 3</td></tr>
<tr><td>Row 4</td></tr>
<tr><td>Row 5</td></tr>
<tr><td>Row 6</td></tr>
<tr><td>Row 7</td></tr>
<tr><td>Row 8</td></tr>
<tr><td>Row 9</td></tr>
<tr><td>Row 10</td></tr>
<tr><td>Row 11</td></tr>
<tr><td>Row 12</td></tr>
<tr><td>Row 13</td></tr>
<tr><td>Row 14</td></tr>
<tr><td>Row 15</td></tr>
<tr><td>Row 16</td></tr>
<tr><td>Row 17</td></tr>
<tr><td>Row 18</td></tr>
<tr><td>Row 19</td></tr>
<tr><td>Row 20</td></tr>
</tbody>
</table>
<table>
<thead>
<tr><th>Table 3: even shorter</th></tr>
</thead>
<tbody>
<tr><td>Row 1</td></tr>
<tr><td>Row 2</td></tr>
<tr><td>Row 3</td></tr>
<tr><td>Row 4</td></tr>
<tr><td>Row 5</td></tr>
<tr><td>Row 6</td></tr>
</tbody>
</table>
<table>
<thead>
<tr><th>Table 4 more than 1 column long</th></tr>
</thead>
<tbody>
<tr><td>Row 1</td></tr>
<tr><td>Row 2</td></tr>
<tr><td>Row 3</td></tr>
<tr><td>Row 4</td></tr>
<tr><td>Row 5</td></tr>
<tr><td>Row 6</td></tr>
<tr><td>Row 7</td></tr>
<tr><td>Row 8</td></tr>
<tr><td>Row 9</td></tr>
<tr><td>Row 10</td></tr>
<tr><td>Row 11</td></tr>
<tr><td>Row 12</td></tr>
<tr><td>Row 13</td></tr>
<tr><td>Row 14</td></tr>
<tr><td>Row 15</td></tr>
<tr><td>Row 16</td></tr>
<tr><td>Row 17</td></tr>
<tr><td>Row 18</td></tr>
<tr><td>Row 19</td></tr>
<tr><td>Row 20</td></tr>
<tr><td>Row 21</td></tr>
<tr><td>Row 22</td></tr>
<tr><td>Row 23</td></tr>
<tr><td>Row 24</td></tr>
<tr><td>Row 25</td></tr>
<tr><td>Row 26</td></tr>
<tr><td>Row 27</td></tr>
<tr><td>Row 28</td></tr>
<tr><td>Row 29</td></tr>
<tr><td>Row 30</td></tr>
<tr><td>Row 31</td></tr>
<tr><td>Row 32</td></tr>
<tr><td>Row 33</td></tr>
<tr><td>Row 34</td></tr>
<tr><td>Row 35</td></tr>
<tr><td>Row 36</td></tr>
<tr><td>Row 37</td></tr>
<tr><td>Row 38</td></tr>
<tr><td>Row 39</td></tr>
<tr><td>Row 40</td></tr>
<tr><td>Row 41</td></tr>
<tr><td>Row 42</td></tr>
<tr><td>Row 43</td></tr>
<tr><td>Row 44</td></tr>
<tr><td>Row 45</td></tr>
<tr><td>Row 46</td></tr>
<tr><td>Row 47</td></tr>
<tr><td>Row 48</td></tr>
<tr><td>Row 49</td></tr>
<tr><td>Row 50</td></tr>
<tr><td>Row 51</td></tr>
<tr><td>Row 52</td></tr>
<tr><td>Row 53</td></tr>
<tr><td>Row 54</td></tr>
<tr><td>Row 55</td></tr>
<tr><td>Row 56</td></tr>
<tr><td>Row 57</td></tr>
<tr><td>Row 58</td></tr>
<tr><td>Row 59</td></tr>
<tr><td>Row 60</td></tr>
</tbody>
</table>
</div>
</body>
</html>