Title: CSS Center Alignment
Last modified: January 29, 2025

---

# CSS Center Alignment

 *  [davidmacarthur](https://wordpress.org/support/users/davidmacarthur/)
 * (@davidmacarthur)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/css-center-alignment/)
 * I’ll preface this by saying I’ve never developed with CSS but I have a reasonable
   understanding through context. This is a fresh site, only been up a few days 
   and I’m working on a few tweaks to the theme. I have a post on the url and the
   featured media appears left aligned but I’d like it to either stretch to fill
   the confines of the post width or just be centred at the top of the post. I’ve
   been poking the theme CSS for a day and not had much luck figuring it out. If
   anyone can offer any assistance it would be most appreciated.
 * I believe this is the section I should be looking at.
 *     ```wp-block-code
       /*  Featured media  ----------------------------------------- */.featured-media a,.featured-media img.featured-media iframe { display: block; }.featured-media iframe,.featured-media object { border: none; margin: 0; }.featured-media a { overflow: hidden; }.featured-media a img { margin: 100 auto; }.featured-media a:hover img { 	transform: scale(1.1);	opacity: 0.8;}.media-caption {	font-size: 0.8em;	line-height: 110%;	font-weight: 700;	color: #999;	padding: 20px 0;	margin: 0 10%;	border-bottom: 1px solid #eee;}
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcss-center-alignment%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/css-center-alignment/#post-18273044)
 * looking at your site, you use `baskerville` theme.
    I recommend asking at [https://wordpress.org/support/theme/baskerville/#new-post](https://wordpress.org/support/theme/baskerville/#new-post)
   so its developers and support community can help you with this.
 *  Thread Starter [davidmacarthur](https://wordpress.org/support/users/davidmacarthur/)
 * (@davidmacarthur)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/css-center-alignment/#post-18273099)
 * Ahh thank you, I’ll definitely drop a message in there.
 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/css-center-alignment/#post-18273113)
 * thread continued at [https://wordpress.org/support/topic/feature-image-center-alignment/](https://wordpress.org/support/topic/feature-image-center-alignment/)

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

The topic ‘CSS Center Alignment’ is closed to new replies.

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [t-p](https://wordpress.org/support/users/t-p/)
 * Last activity: [1 year, 4 months ago](https://wordpress.org/support/topic/css-center-alignment/#post-18273113)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
