# Image Alignment

**URL:** https://meta.discourse.org/t/image-alignment/15408
**Category:** Feature
**Created:** [May 7, 2014, 5:56pm UTC](https://meta.discourse.org/t/image-alignment/15408 "2014-05-07T17:56:14Z")
**Posts on this page:** 1
**Showing post:** 19

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [June 9, 2018, 5:38am UTC](https://meta.discourse.org/t/image-alignment/15408/19 "2018-06-09T05:38:22Z")

</div>

You don’t need a plugin to whitelist classes anymore, you can just use `data-theme-*` attributes directly in your post’s markup.

You’d do something like

```HTML
<div data-theme-image="left">
  <img src="https://example.com/example.jpg" >
</div>

```

and then in your site customizations you’d have add corresponding CSS

```CSS
[data-theme-image="left"] {
    float: left;
    img {
      margin: 1.3em 1em 0 0;
    }
}

```

 ![38%20AM](https://global.discourse-cdn.com/meta/original/3X/f/a/face8fbfbe35fc7a69d4342057e6212c19955d4e.png)

Might be a good case for a simple theme component.

---

_[View the full topic](https://meta.discourse.org/t/image-alignment/15408)._
