HTML <div> in Tables destroys column alignment #4481

Closed
opened 2026-02-05 08:58:33 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @TobiZog on GitHub (Feb 23, 2024).

Describe the Bug

Centered header items in tables are left aligned in PDF export. This happens, because the PDF export resizes the tables in another way than the website. The website reduces the columns to it's minimal size, meanwhile the PDF distributes the sizes continues.

Steps to Reproduce

  1. Create a table in markdown
  2. Center a column with :---:
  3. Adding to the column
    ID
  4. Save and export as PDF

Expected Behaviour

Nearly same table column sizes to handle such edge cases, where users gives fixed minimal column sizes.

Screenshots or Additional Context

Website:
image

PDF:
image

Browser Details

Firefox 123.0

Exact BookStack Version

v.23.12.2

Originally created by @TobiZog on GitHub (Feb 23, 2024). ### Describe the Bug Centered header items in tables are left aligned in PDF export. This happens, because the PDF export resizes the tables in another way than the website. The website reduces the columns to it's minimal size, meanwhile the PDF distributes the sizes continues. ### Steps to Reproduce 1. Create a table in markdown 2. Center a column with `:---:` 3. Adding to the column <div style="width:30px">ID</div> 4. Save and export as PDF ### Expected Behaviour Nearly same table column sizes to handle such edge cases, where users gives fixed minimal column sizes. ### Screenshots or Additional Context Website: ![image](https://github.com/BookStackApp/BookStack/assets/67568441/e0f13359-cb97-492d-9dc7-4b55a427d390) PDF: ![image](https://github.com/BookStackApp/BookStack/assets/67568441/8aa55686-d8fc-4c2f-b33b-5d89d943d61b) ### Browser Details Firefox 123.0 ### Exact BookStack Version v.23.12.2
OVERLORD added the 🐛 Bug:cat2:🐈 Possible duplicate labels 2026-02-05 08:58:33 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Feb 23, 2024):

Thanks for the report @TobiZog.
I feel this is already covered by issue #1280, so I'm going to close this off as a duplicate.

@ssddanbrown commented on GitHub (Feb 23, 2024): Thanks for the report @TobiZog. I feel this is already covered by issue #1280, so I'm going to close this off as a duplicate.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4481