If you’re having trouble aligning images in WordPress, consider using the alignnone class. While there are other ways for image alignment, this method is a great alternative to those and something you should familiar yourself with. In this article, learn how to use this CSS class in WordPress.
What is Class alignnone in WordPress?
The Class alignnone is one of the classes that help align your images on WordPress. The others are alignright, alignleft, and aligncenter.
When you upload an image using the image uploader and select an alignment, you can choose from these options:
That’s what Class Alignnone does in WordPress. You can also manually add the tag to the image of your choice. But after WordPress 2.5, all the software does the tagging for you so there’s no need to edit the code to get the desired alignment.
What is Class alignnone in WordPress?
The Class alignnone is one of the classes that help align your images on WordPress. The others are alignright, alignleft, and aligncenter.
When you upload an image using the image uploader and select an alignment, you can choose from these options:
- Align Left
- Align Right
- Align Center
- No Alignment
Code:
<img class="alignnone" src="...">