jekyll / jekyll-help

NO LONGER MAINTAINED. USE JEKYLL TALK INSTEAD.
https://talk.jekyllrb.com
146 stars 19 forks source link

An image wrapped inside div does not display #299

Closed knsam closed 9 years ago

knsam commented 9 years ago

An image wrapped inside a div does not show up in the html file created. The element #my_photo is styled as follows:

my_photo

{ float: right; padding-left: 50px; }

kleinfreund commented 9 years ago

This is not a Jekyll issue. When you use Markdown or HTML correctly to show an image and have no CSS applied that will hide the image, the image will show up. Jekyll doesn't interfere with that.

Also I don't understand what this pull request is doing here.

jaybe-jekyll commented 9 years ago

Depending on the markdown renderer and options, sometimes markdown is not rendered within html blocks.

Does the markdown display versus the image?

Try separating the html and markdown with a newline/whitespace.

Also try without the html block.

knsam commented 9 years ago

Hey, first off, this must have been an issue, I realised it only after I posted here. So, sorry!

@jaybe-jekyll Yes, the markdown code shows up instead of the image.

kleinfreund commented 9 years ago

Then it might be the issue. Consider sometthing like this:

<p>Nice, but _sneaky_ paragraph.</p>

This will render a paragraph, but the sneaky won't be put inside em tags, but as is (i.e. _sneaky_, not <em>sneaky</em>). The problem is you can't mix HTML and Markdown in the same line.

This will work:

Nice, but  _not so sneaky_ paragraph.

… which is the same as this:

<p>Nice, but  <em>not so sneaky</em> paragraph.</p>

If this doesn't help you, it'd really help to have an example file with Markdown that is not processed correctly.

knsam commented 9 years ago

@kleinfreund Thank you very much! That indeed clarifies my problem. And, I shall so close this issue.

Thank you for putting up with my newbie question.