Title: Aligning an image
Last modified: August 18, 2016

---

# Aligning an image

 *  [patrickwesseling](https://wordpress.org/support/users/patrickwesseling/)
 * (@patrickwesseling)
 * [21 years, 5 months ago](https://wordpress.org/support/topic/aligning-an-image/)
 * Hi,
    I want to post some info with an image I want to align in the center. I 
   use the code: <img src=”[http://www.mysite.com/test.jpg&#8221](http://www.mysite.com/test.jpg&#8221);
   align=center alt=”Test Picture”> But it is not showing in the center. I thought
   the code was rigth. Or am I in desperate need of some sleep? Patrick

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 5 months ago](https://wordpress.org/support/topic/aligning-an-image/#post-112710)
 * try some css
    .cent { text-align: center; } `<div class="cent"> <img src="http://
   www.mysite.com/test.jpg" alt="Test Picture"/> </div>
 *  Thread Starter [patrickwesseling](https://wordpress.org/support/users/patrickwesseling/)
 * (@patrickwesseling)
 * [21 years, 5 months ago](https://wordpress.org/support/topic/aligning-an-image/#post-112711)
 * Hi,
    Anything special I have to do? Or can I just past that in my article? I 
   am no css guru so that’s why the question. Patrick
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 5 months ago](https://wordpress.org/support/topic/aligning-an-image/#post-112713)
 * Paste this into the bottom of your css:
    .cent { text-align: center; } and then
   just paste the code into your posting area.
 *  Thread Starter [patrickwesseling](https://wordpress.org/support/users/patrickwesseling/)
 * (@patrickwesseling)
 * [21 years, 5 months ago](https://wordpress.org/support/topic/aligning-an-image/#post-112825)
 * Hi,
    I did that but when posting I only get to see the alt text. I suppose I 
   have to put it in the “code” block, right? I did that but to same. I must be 
   doing something wrong. Patrick
 *  [Beel](https://wordpress.org/support/users/beel/)
 * (@beel)
 * [21 years, 5 months ago](https://wordpress.org/support/topic/aligning-an-image/#post-112829)
 * link?
 *  Thread Starter [patrickwesseling](https://wordpress.org/support/users/patrickwesseling/)
 * (@patrickwesseling)
 * [21 years, 5 months ago](https://wordpress.org/support/topic/aligning-an-image/#post-112830)
 * Hi,
    Ok when I edit/write I look in the bottom where I can see how it will look
   in the end. It shows not in the center there but it does when I save/publish 
   it and look on my site at the article. So it does work only not in the preview
   part. Patrick
 *  [Beel](https://wordpress.org/support/users/beel/)
 * (@beel)
 * [21 years, 5 months ago](https://wordpress.org/support/topic/aligning-an-image/#post-112831)
 * Right, it wouldn’t work in the admin preview.
 *  Thread Starter [patrickwesseling](https://wordpress.org/support/users/patrickwesseling/)
 * (@patrickwesseling)
 * [21 years, 5 months ago](https://wordpress.org/support/topic/aligning-an-image/#post-112845)
 * Hi,
    I was wondering if it also is possible to have several images next to each
   other? Patrick
 *  Thread Starter [patrickwesseling](https://wordpress.org/support/users/patrickwesseling/)
 * (@patrickwesseling)
 * [21 years, 5 months ago](https://wordpress.org/support/topic/aligning-an-image/#post-112864)
 * Hi,
    Got it. 🙂 Patrick

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Aligning an image’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 3 participants
 * Last reply from: [patrickwesseling](https://wordpress.org/support/users/patrickwesseling/)
 * Last activity: [21 years, 5 months ago](https://wordpress.org/support/topic/aligning-an-image/#post-112864)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
