Tables and div elements are not centered in show.js

If I add the following slide to the default presentation provided by the opens.js command, then the table will not be centered.

  <section>
  <p>This is centred</p>

  <table>
    <tr>
      <td>This</td>
      <td>is</td>
      <td>not</td>
    </tr>
  </table>
  </section>

enter image description here

I can fix this by adding to the padding, but then it depends on the size of the screen, and I worry that when I go to submit the screen will be a different size. Should there be a better way?

+4
source share
1 answer

According to this and my testing, if you add a class revealto your table, the latest display.js function should focus on it.

  <section>
  <p>This is centred</p>

  <table class="reveal">
    <tr>
      <td>This</td>
      <td>is</td>
      <td>not</td>
    </tr>
  </table>
  </section>
+4
source

All Articles