37

How would I go about doing this? Putting the following code into the Markdown generator gives me the desired output

<div style="float: left"><img src="http://ompldr.org/vaDU5NQ/scrotter.png"/>
</div>
I'm trying not to, kid. Don't act so surprised, Your Highness. You weren't
on any mercy mission this time. Several transmissions were beamed to this
ship by Rebel spies. I want to know what happened to the plans they sent
you. Kid, I've flown from one side of this galaxy to the other.

I've seen a lot of strange stuff, but I've never seen anything to make me
believe there's one all-powerful Force controlling everything.

However, adding this code to my README.md file makes it an inline image instead of floating.

How could I work around this? Is it a Github bug?

Zombo
  • 1
  • 62
  • 391
  • 407
yttrium
  • 405
  • 4
  • 8

2 Answers2

82

I know this thread's old, but for anyone interested, you can use <img align="left" src="img.jpg"> and <img align="right" src="img.jpg"> to float images on GitHub.

Paul Shryock
  • 1,309
  • 11
  • 17
2

I believe it is a security issue with GitHub. My understanding is they strip all HTML attributes such as style with the execption of perhaps href.

Zombo
  • 1
  • 62
  • 391
  • 407
  • 2
    Old question but I ended up using gh-pages instead of my readme file, because it's just a much better way of doing things - gh-pages isn't restricted by this, and behaves like a normal html page. – yttrium May 03 '13 at 17:06