Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Table: why isn't my code working ?

When I type the following code under JsFiddle, it works and display a 4x4 table.&nbsp; HTML &lt;div class="divTable"&gt; &lt;div class="divTableBody"&gt; &lt;div class="divTableRow"&gt; &lt;div class="divTableCell"&gt;1&lt;/div&gt; &lt;div class="divTableCell"&gt;2&lt;/div&gt; &lt;div class="divTableCell"&gt;3&lt;/div&gt; &lt;div class="divTableCell"&gt;4&lt;/div&gt; &lt;/div&gt; &lt;div class="divTableRow"&gt; &lt;div class="divTableCell"&gt;5&lt;/div&gt; &lt;div class="divTableCell"&gt;6&lt;/div&gt; &lt;div class="divTableCell"&gt;7&lt;/div&gt; &lt;div class="divTableCell"&gt;8&lt;/div&gt; &lt;/div&gt; &lt;div class="divTableRow"&gt; &lt;div class="divTableCell"&gt;9&lt;/div&gt; &lt;div class="divTableCell"&gt;10&lt;/div&gt; &lt;div class="divTableCell"&gt;11&lt;/div&gt; &lt;div class="divTableCell"&gt;12&lt;/div&gt; &lt;/div&gt; &lt;div class="divTableRow"&gt; &lt;div class="divTableCell"&gt;13&lt;/div&gt; &lt;div class="divTableCell"&gt;14&lt;/div&gt; &lt;div class="divTableCell"&gt;15&lt;/div&gt; &lt;div class="divTableCell"&gt;16&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; CSS: /* DivTable.com */ .divTable{ display: table; width: 100%; } .divTableRow { display: table-row; } .divTableHeading { background-color: #EEE; display: table-header-group; } .divTableCell, .divTableHead { border: 1px solid #999999; display: table-cell; padding: 3px 10px; } .divTableHeading { background-color: #EEE; display: table-header-group; font-weight: bold; } .divTableFoot { background-color: #EEE; display: table-footer-group; font-weight: bold; } .divTableBody { display: table-row-group; } However when I try under roll20 preview tab, all the numbers are aligned below each other. <a href="https://jsfiddle.net/5371nfts/" rel="nofollow">https://jsfiddle.net/5371nfts/</a> What am I doing wrong ?
1538065880

Edited 1538065927
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The sheet parser prepends all classes with sheet- unless they already have it. So, change all your class calls in your css to be .sheet-WhatevertheClassIs. See the wiki for more information. EDIT: I'd also recommend looking at CSS grid instead of html/css tables.