Center-align an image within the image element or row without centering text

I need to center an image within a column, but I don’t want to center the text below it in the same column. Please help.

Hi Matt,

Please go to the Image Element options and click on the Customize tab and add the code below to Element CSS option:

$el {
  width: 100%;
}
$el img {
  display: block;
  margin: auto;
}

For more information about the Element CSS feature please read this article.

Thank you.

I tried that and nothing changed.

Please see https://lbhlc.com/30-year-fixed-rate/

Hi @mattmayo2,

Add this in your custom CSS:

.e149-12.x-image{
    display:block;
} 

Let us know how it goes.

Thanks.

Am I supposed to put this into the Element CSS or the Content Page CSS? I tried both and nothing happened.

Hi There @mattmayo2

If you have tried both options, could you please try copying your custom CSS rules into an online tool like CSS Lint (http://csslint.net/) and see if you’re getting any errors. If you’re getting any CSS errors, you need to fix them so that it will parse correctly.

If not, provide us with the login credentials to your site in a secure note, so that we can test this issue.

Thanks!

Just added secure note with login, please assist with this issue.

There are multiple pages with this format, but you can see an examplpe on https://lbhlc.com/30-year-fixed-rate/

Thanks!

Hi Matt,

Kindly add this code instead to the Element CSS of the image element:

$el {
  display: block;
}

Hope this helps.

Thank you! Worked perfectly

We are delighted to assist you with this.

Cheers!

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