Hello,
Because of the way the image is added, it would be impossible to center it vertically for all brands if they have a different description length.
I see that you added inline style for the image for this brand. I recommend adding the margin in that inline style for each image, so that you can manually change the value singularly.
Hiya, I am a complete novice, would you be able to provide information/links on how to achieve this?
Many thanks!
Hello,
How do you add the brand image and content? Is it from a panel in your Dashboard? If so, does it come from a plugin or the theme?
In any of these 2 cases, I’d recommend contacting the theme/plugin author for further help.
If it’s you manually adding images and content instead, you can use the style attribute on your image like it’s done on the example link you sent to add a margin-top that will center the image vertically.
Hiya, so I have the brand images sourced from the plugin, they are uploaded to the corresponding brands, and the brand image and description is added to pages using:
add_action( ‘woocommerce_single_product_summary’, ‘wc_ninja_add_brand_to_product_page’, 19 );
function wc_ninja_add_brand_to_product_page() {
echo do_shortcode(‘[product_brand width=”74px” height=”74px” class=”alignleft” padding-top=”50px;]’);
}
I should clarify further, I have that code added to a plugin called snippets.
I have been experimenting to see if I can achieve what I want, essentially it’s something like this:
.wc_ninja_add_brand_to_product_page .img {
margin: 25px 15px 20px 0;
}
But however, I imagine it’s not working because I am doing a lot wrong there. I added that both to the snippet and additional CSS, however none of which worked