uncrtn blog

Center Your Photo Index

Sometimes the simplest solution is easily overlooked.

Adding style="text-align: center" inline to the microgram photos page will center the grid. Here is the full snippet which finally worked for me:

<link type="text/css" rel="stylesheet" href="https://microgram.cleverdevil.io/css" />

<div id="microgram" style="text-align: center">
  loading ...
</div>

<script src="https://microgram.cleverdevil.io/js"></script>

I spent an embarrasingly long amount of time trying to center the grid using the custom CSS. I even thought I may have to learn python1 when I looked at the microgram repo. It took me a long time to even think of trying to change the style inline but it works. You can see it on my photos page.


  1. I should actually look into learning python sooner rather than later. [return]
uncrtn blog @uncrtn