Skip to content

Instantly share code, notes, and snippets.

@kigiri
Forked from DavidWells/aligning-images.md
Created September 18, 2018 09:11
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kigiri/4b1d64eba2d465a2ffc1342a0e9e7d6f to your computer and use it in GitHub Desktop.
Save kigiri/4b1d64eba2d465a2ffc1342a0e9e7d6f to your computer and use it in GitHub Desktop.
Guide to aligning images in github readme.md files

Aligning images

left alignment

This is the code you need to align images to the left:

<img align="left" width="100" height="100" src="http://www.fillmurray.com/100/100">

right alignment

This is the code you need to align images to the right:

<img align="right" width="100" height="100" src="http://www.fillmurray.com/100/100">

center alignment example

<p align="center">
  <img width="460" height="300" src="http://www.fillmurray.com/460/300">
</p>

Markdown Formatting on steriods

If you like this, you might enjoy markdown-magic. I built it to automatically format markdown files and allow folks to sync docs/code/data from external sources.

@mateusloubach
Copy link

is this not working anymore?

@Alperencode
Copy link

I guess this is not working anymore

@shmup
Copy link

shmup commented Aug 21, 2022

Why would you guess that? It is indeed working @Alperencode

See: https://github.com/shmup/awesome-cosmopolitan#readme

@Alperencode
Copy link

@shmup Hi Jared, as you can see by @mateusloubach comment too this aligning was broken back then. As I remember it was broken for 2 days or something like that. That's why I guess that but now it's working yeah.

@shmup
Copy link

shmup commented Aug 21, 2022

@Alperencode Ah, fair! Glad it was a very short hiccup because I do appreciate the alignment heh

@Alperencode
Copy link

@shmup Me too, I was using it on my profile readme so yeah I'm glad it's working too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment