Title: Aligning image within stack
Last modified: July 19, 2023

---

# Aligning image within stack

 *  [swoolrich](https://wordpress.org/support/users/swoolrich/)
 * (@swoolrich)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/aligning-image-within-stack/)
 * I have a stack with a heading and news items for a particular category at the
   top of the page.
 * I want to add a right-aligned image to the stack, but when I add the image it’s
   toolbar doesn’t have the ‘align’ icon.
 * Can this be done? Quite happy if it’s done with custom CSS.
 * I’m also happy for it to be inside the stack and it’s border, or outside it as
   long as it’s to the right.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Faligning-image-within-stack%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [Gerry](https://wordpress.org/support/users/metamezzo/)
 * (@metamezzo)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/aligning-image-within-stack/#post-16907618)
 * Hello, yes, it can be done with some custom CSS. I would add an additional CSS
   class to the **Latest Posts** block (e.g. `my_latest_posts`) and add the following
   in the Global Styles additional CSS at **Appearance **> **Editor **or via **Edit
   Site **
 *     ```wp-block-code
       /* my_latest_posts is the additional CSS class */
       /* please adjust the ff code based on your requirements */
   
       /* Make the list of latest posts take up available width */
       ul.my_latest_posts.wp-block-latest-posts { width: 100%; }
   
       /* Place the post title and featured image side-by-side */
       .my_latest_posts.wp-block-latest-posts li {
       display: flex;
       align-items: center;
       justify-content: space-between;
       }
   
       /* Place the image to the right of the post title */
       .my_latest_posts .wp-block-latest-posts__featured-image { order: 1; }
       ```
   
    -  This reply was modified 2 years, 8 months ago by [Gerry](https://wordpress.org/support/users/metamezzo/).
      Reason: Added some more comments to the CSS

Viewing 1 replies (of 1 total)

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Gerry](https://wordpress.org/support/users/metamezzo/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/aligning-image-within-stack/#post-16907618)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
