hi, i’m wondering how can i simply color cells in Obsidian. i know about <table><tr><td></td>
, but it’s very slow to edit
What I’m trying to do
trying to color cells in md table
Things I have tried
i tried applying <td style="background-color:00FF00;color:000000"></td>
, but it results in this:
cells before the ones with td style are simply empty. and there is no way to remove them
now, i need to mention that i use it as a tracker. so if there is an answer on how to make a simple tracker with ability to color it, i will be happy
holroy
February 2, 2024, 3:13pm
2
In the post below I showcase a way to use tags to highlight cells in an ordinary markdown table towards the end. You might want to use something similar in your setup.
First of all, your html markup is slightly skewed as you’ve contained the <thead> within the <tbody> section. This should be:
<table>
<caption> ... </captrion>
<thead>
<th> ... </th><th> ... </th>
</thead>
<tbody>
<tr> ... </tr> <tr> ... </tr>
</tbody>
</table>
This would most likely simplify and correct some of your CSS which migth be interpreted wrongly by the different engines for live preview and reading mode.
Secondly, I’m not sure why you’re even using an html table, a…
okay, it works, but…i assume i can not change highlighted color in Obsidian? only in css snippet?
holroy
February 2, 2024, 3:44pm
5
With this approach you do need to change the color in the CSS file, but there is nothing stopping you from predefining colors. One example could be to use #_/red
and #_/green
and #_/yellow
as tags with their respective color definitions.
okay then, thanks! one extra question: can i define specific color to this?
and also add a color to inbetween cells’ borders?
holroy
February 2, 2024, 4:42pm
7
In the post there are examples on just a little bit on what you can change, but you can indeed change borders using this trick.
by any chance do you know how?
system
Closed
February 9, 2024, 4:45pm
9
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.