I want to change the styles of the container element of an embedded image. (More specifically, its width)
I’ve tried several approaches and found something that works partially.
What’s strange is that in some scenarios that I expected it to work, it just won’t render.
I wonder whether it’s a bug or that Markdown specifications forbid that syntax explicitly?
Someone enlighten me plz… (and move me to Bug report category if necessary)
This doesn’t work, the Markdown source code  is displayed as-is.
I say to myself, fine, mixing Markdown and HTML syntax isn’t expected to work out.
But then this:
Strangely, the image is rendered in Live Preview mode, but not in Reading mode.
Despite the fact that there’s a line break in between, in Reading mode the div element is concatenated to the markdown source code , all together being put inside a block div element.
So… it that a correctly implemented Markdown syntax rendering? (That I need to insert another line break, or to prepend some plaintexts at the beginning of the div line, in order to make obsidian render the embedded image)
Oh, afterwards I also found that (with strict line-break option off) Markdown tables placed after a div element also cannot render (neither in Live Preview mode nor in Reading mode):
Yeah I know that. But the thing is, that extra empty line gets rendered in two different ways in Live Preview mode as in Reading mode. (It translates into a <div><br /></div> element in Live Preview while the Reading mode simply ignores it)
Such that I’ll have to use more unstable css selectors (might break in the future) to locate the image/table element.
But I want it to be more persistent, so I ask instead: What’s wrong with placing a div just one line above an image/table? I don’t get it… Is there a markdown rule for this?
OK, but placing a div just one line below the image/table currently works. Will this behaviour be removed in the future? Or maybe you can accept this as valid markdown?
Alright, but then I also find that placing a <span></span> just one line above a table breaks the rendering as well (below is ok), while span is an inline HTML tag. Bugs involved here ?
As for images, a <span></span> above/below/prepending an image currently works, so I guess this is legitimate, right?
I don’t know, is there a markdown rule saying that since table itself is block-level so it should always expect an extra empty line above/below it?
I mean, not even inline HTML tags like this way? :