Simple classes to align media or content within paragraphs:
align-left
align-right
align-center
⚠️ Important
The alignment can not be seen on client without a width on the element. The demo adds a width.
☞ Remember
The benefit of these classes instead of other solutions (e.g.
style="float:right"
):
- Spacing is consistent and aware of its own alignment.
- No need for deprecated
<img align="…">
attribute.- No need for deprecated
<center>
element.
ⓘ Notice
These classes are from Django CMS Picture (source), but suitable for general usage, especially in TACC-Docs, which does not use Django CMS.