CSS for Markdown Table Header / Cells / ...  SOLVED

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

zarkogajic
User
Posts: 1473
Joined: Thu Sep 05, 2019 12:35 pm

CSS for Markdown Table Header / Cells / ...

Post by zarkogajic »

Hi Support,

I'm generating some markdown and using New - From Markdown ...

All works well ... :)

I'd like to change the style used for tables (specifically the header "th").

Markdown looks like:

Code: Select all

# Header
**Bold text**

Table
|TH1|TH2|Th3|
|---|---|---|
| 1 | 2 | 3 |
| 4 | 5 | 6 |
PDF like:

image.png

What css class inside "Style for MD" should be added/edited?

p.s.
This one does not include styles for tables:
image(1).png
-žarko
You do not have the required permissions to view the files attached to this post.
Dunneve
User
Posts: 1
Joined: Thu Mar 20, 2025 12:55 pm

Re: CSS for Markdown Table Header / Cells / ...

Post by Dunneve »

zarkogajic wrote: Fri Mar 07, 2025 3:07 pm Hi Support,

I'm generating some markdown and using New - From Markdown ...

All works well ... :)

I'd like to change the style used for tables (specifically the header "th").

Markdown looks like:

Code: Select all

# Header
**Bold text**

Table
|TH1|TH2|Th3|
|---|---|---|
| 1 | 2 | 3 |
| 4 | 5 | 6 |
PDF like:


image.png


What css class inside "Style for MD" should be added/edited?

p.s.
This one does not include styles for tables:

image(1).png

-žarko

I was working on a project and needed to customize markdown tables and I spent a while trying to figure out the right way to target table headers with CSS, but then I realized that by approaching it with some knowledge from mobile app development, like how Flutter handles custom styling, I could quickly solve the issue. I ended up using simple CSS tweaks to get the look I wanted without overcomplicating things. If you're interested, I found that checking out some [url=https://www.cogniteq.com/blog/top-flutter-app-development-companies]flutter app development companies[/url] gave me a ton of insights on how to improve my approach and save time. I’m sharing this because it really helped me, and I hope it can save you some effort too
Hey žarko! I ran into something similar while trying to customize the look of tables in another project. To customize the style for the table headers in your Markdown, you’ll need to add some custom CSS targeting the <th> tags. Since the default style for markdown doesn’t include tables, you can add smth like this to your style for MD section:

table th {
background-color: #f0f0f0;
font-weight: bold;
text-align: center;
padding: 8px;
border: 1px solid #ddd;
}
This will give the table headers a light background, bold text, and a little padding to make them stand out. If you want to change the font size or color, you can tweak it further
zarkogajic
User
Posts: 1473
Joined: Thu Sep 05, 2019 12:35 pm

Re: CSS for Markdown Table Header / Cells / ...

Post by zarkogajic »

Hi Dunneve,

Thank, I already tried that.

Does not work with markdown.css when converting markdown files to PDF.

So, still waiting for Support to provide more info ...

-žarko
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 11036
Joined: Wed Jan 03, 2018 6:52 pm

Re: CSS for Markdown Table Header / Cells / ...

Post by Daniel - PDF-XChange »

Hello, zarkogajic

At the moment, I am afraid we do not have this functionality. I have heard back from the dev team (our sincere apologies for the long delay), and we have created a ticket for this item, to add this functionality in the future.

RT#7412: CSS Sheet for MD tables compatibility

As with any ticket, this is an internal only item, if you are seeking an update in the future, please cite this number in your discussion with any support team member, and we will be able to check up on it.

Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
zarkogajic
User
Posts: 1473
Joined: Thu Sep 05, 2019 12:35 pm

Re: CSS for Markdown Table Header / Cells / ...  SOLVED

Post by zarkogajic »

Hi Daniel,

OK, thanks.

-žarko
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19868
Joined: Mon Jan 12, 2009 8:07 am

CSS for Markdown Table Header / Cells / ...

Post by Stefan - PDF-XChange »

:)