Markdown tables missing CSS style #5794

Closed
opened 2025-12-29 19:32:45 +01:00 by adam · 4 comments
Owner

Originally created by @YukiYue on GitHub (Dec 17, 2021).

Originally assigned to: @kkthxbye-code on GitHub.

NetBox version

v3.0.8

Python version

3.8

Steps to Reproduce

  1. after upgrading to v3.0, a plugin that I wrote before which has render_markdown in its HTML page can not work properly. I would want to render a table by inputting
    Screenshot from 2021-12-17 18-03-18
    but what I get is not a table
  2. I tried this input in some other places using render_mardown like Circuits.providers.comments, they showed the same result:
    Screenshot from 2021-12-17 18-00-17

Expected Behavior

a table would show up

Observed Behavior

no table show up

Originally created by @YukiYue on GitHub (Dec 17, 2021). Originally assigned to: @kkthxbye-code on GitHub. ### NetBox version v3.0.8 ### Python version 3.8 ### Steps to Reproduce 1. after upgrading to v3.0, a plugin that I wrote before which has render_markdown in its HTML page can not work properly. I would want to render a table by inputting ![Screenshot from 2021-12-17 18-03-18](https://user-images.githubusercontent.com/88376287/146527117-ea173686-e0c1-452c-8480-79feb6db31d0.png) but what I get is not a table 2. I tried this input in some other places using `render_mardown` like Circuits.providers.comments, they showed the same result: ![Screenshot from 2021-12-17 18-00-17](https://user-images.githubusercontent.com/88376287/146526685-488ecc32-e41d-453f-8b2a-aeb8f360e8d0.png) ### Expected Behavior a table would show up ### Observed Behavior no table show up
adam added the type: bugstatus: accepted labels 2025-12-29 19:32:45 +01:00
adam closed this issue 2025-12-29 19:32:46 +01:00
Author
Owner

@kkthxbye-code commented on GitHub (Dec 17, 2021):

The table is there:

image

I'm guessing your issue is that it is un-styled.

Adding class="table" to the table element turns it into this:

image

Is that what you expected?

Not sure how to fix it in a non-ugly way. Either define custom css for tables with no class or extend the table extension in python-markdown.

@kkthxbye-code commented on GitHub (Dec 17, 2021): The table is there: ![image](https://user-images.githubusercontent.com/400797/146527934-e02bf595-de2d-43e1-bead-dc76ac97bd9e.png) I'm guessing your issue is that it is un-styled. Adding class="table" to the table element turns it into this: ![image](https://user-images.githubusercontent.com/400797/146528433-c762cdc5-3171-4f15-977c-c54095c7c624.png) Is that what you expected? Not sure how to fix it in a non-ugly way. Either define custom css for tables with no class or extend the table extension in python-markdown.
Author
Owner

@YukiYue commented on GitHub (Dec 20, 2021):

The table is there:

image

I'm guessing your issue is that it is un-styled.

Adding class="table" to the table element turns it into this:

image

Is that what you expected?

Not sure how to fix it in a non-ugly way. Either define custom css for tables with no class or extend the table extension in python-markdown.

thanks, but why can you have so much space in each column? Mine looks much more ugly than yours. How and where did you ad class="table"?

Screenshot from 2021-12-20 13-20-16 @kkthxbye-code

@YukiYue commented on GitHub (Dec 20, 2021): > The table is there: > > ![image](https://user-images.githubusercontent.com/400797/146527934-e02bf595-de2d-43e1-bead-dc76ac97bd9e.png) > > I'm guessing your issue is that it is un-styled. > > Adding class="table" to the table element turns it into this: > > ![image](https://user-images.githubusercontent.com/400797/146528433-c762cdc5-3171-4f15-977c-c54095c7c624.png) > > Is that what you expected? > > Not sure how to fix it in a non-ugly way. Either define custom css for tables with no class or extend the table extension in python-markdown. thanks, but why can you have so much space in each column? Mine looks much more ugly than yours. How and where did you ad class="table"? ![Screenshot from 2021-12-20 13-20-16](https://user-images.githubusercontent.com/88376287/146715610-d7866d0e-55a0-4648-8fb5-9e0198f6c120.png) @kkthxbye-code
Author
Owner

@kkthxbye-code commented on GitHub (Dec 20, 2021):

I can take this one @jeremystretch

You fixed it here before:

2fce7ebd8f

The CSS was just not ported to v3.0.

@kkthxbye-code commented on GitHub (Dec 20, 2021): I can take this one @jeremystretch You fixed it here before: https://github.com/netbox-community/netbox/commit/2fce7ebd8fee511a0fef8b3aada11037e8ef8e9f The CSS was just not ported to v3.0.
Author
Owner

@jeremystretch commented on GitHub (Dec 20, 2021):

@kkthxbye-code thanks!

@jeremystretch commented on GitHub (Dec 20, 2021): @kkthxbye-code thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5794