augnustin / google-docs-publisher

Publish good looking Google Docs

Home Page:https://gdoc.pub

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Table Element Not Centered

jgee43 opened this issue · comments

Currently, a centered section of page works fine, but centering does not carry over to centering a table in a page.

Example here:
https://gdoc.pub/doc/e/2PACX-1vRHSjmaM-DWX-DEm05D55gWs_xzaRpa1lNjvKIgFL9o-5aOq1PCrZ3ogtRqyWBjapfa1iK_i4PiibRv

Currently, I can fix it on the page with the dev tools using this in the table properties:

style="margin-left: auto; margin-right:auto;"

I'm not sure if there's a way to incorporate a change to the CSS based upon the centering of the element directly above the table or not. (Or what the best approach would be here.)

Side note: I love this publisher! Many thanks for sharing it!

Hello @jgee43

I see your issue. The incorrect style which moves your table to the left is already there in the google docs version, hence I suspect you did applied some style that fixed the position of the table and set it incorrectly.

Try making another table bellow to see if it behaves as expected, if so, you could try remove the styles of your current table but probably the easier is to move your content to your newly built table.

Good luck