Align images in Markdown a CSS3 attribute selector and a hashtag

Ever wanted to align an image in Markdown? I found a super simple and elegant way to do just that! All you need to do is append a fragment identifier (hashtag) to the end of the image url, and then select that tag with a CSS3 attribute selector. For example, you might align an image to the right like this: Markdown: ![Alt text](/path/to/image.jpg#right) CSS: img[src*='#right'] { float: right; } CSS3 selectors have been supported since IE8 so there shouldn’t be much of a…

Keep reading