How do I center image on featured image blog

I am using this css to make image smaller but it aligns to the right how do I center the image

.search-results .entry-featured {
width: 50%;
}
.single-post .entry-featured {
width: 50%;
}
.single-x-portfolio .entry-featured {
width: 50%;
}
.category .entry-featured {
width: 50%;
}

Hello George,

Thanks for writing in! Since you have reduced the width of your featured image, it will not be aligned to the left by default. To center the featured image area, you must have to add an auto left and right margin. Therefore, your final code will be:

.search-results .entry-featured,
.single-post .entry-featured,
.single-x-portfolio .entry-featured,
.category .entry-featured {
	width: 50%;
	margin-left: auto;
	margin-right: auto;
}

To know more about the CSS margin, kindly check this out:

thanks that did the trick

You’re welcome!
It’s good to know that it has worked for you.

Could the same be done for the text underneath

Hello George,

To better assist you with your issue, kindly provide us the URL of the page in question so that we can check out if the code above will apply.

Thank you.

I also have a question on adding navigation to single page posts to go back to blog/educational or to the next post. The text on single post is what I am asking as well the image is fine centered with previous code I will add secure note thanks

I have pro child theme installed on site as well I am thinking that code would need to be placed in functions.php for navigation

.single .entry-featured {
display:none;
}

This is only working for the 1st 3 entries would like to remove featured image on all single posts and just keep featured image on blog/educational page

Hey George,

To add navigation on the single posts, you can add the following code in your child theme’s functions.php:

function x_add_post_navigation() {
		if ( is_singular('post') ) {
  			echo '<div class="navigation-post">';
			x_entry_navigation();
			echo '</div>';
		}
}
add_action('x_after_the_content_end', 'x_add_post_navigation');

This would require custom CSS as this is not a theme feature by default and is outside of our support scope, but we will do our best to help you getting started with the customization but we will not be able to implement it. To center align the content on single posts, you can add the following code in the Theme Options > CSS:

.single .entry-content {
    text-align: center;
}

The code is correct, this will hide the featured image on all the single posts only. Currently you only have 3 posts, try adding another and it will work on others as well.

Please note that the code provided above serves as a guide only and is to help you in getting started so implementing it and maintaining the code will be out of our support scope and for further maintenance for new possible versions of the theme that may cause the customization to break, you will need to hire a developer.

Here are some related links for further reading, this could help you in finding and implementing some CSS fixes:

Thank you for understanding!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.