Black Friday Sale! Get up to $30 off GP Premium! Learn more ➝

[Resolved] Centering a gif image in the 404 template

Home Forums Support [Resolved] Centering a gif image in the 404 template

Home Forums Support Centering a gif image in the 404 template

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #207364
    Max

    Tom

    I am trying to create a custom 404 template in my child theme.

    I copied the GP 404 across and then inserted an image as follows above your existing text paragraph. It is an animated gif. Image displays fine, but I can’t get it to center. I have tried align=”middle” but it did not work either.

    What do I need to fix this?

    <p>
    <img src="http://localhost/forum/wp-content/uploads/big_smile.gif" style="text-align:centre;">
     </p>
     <p>
    <?php echo apply_filters( 'generate_404_text', __( 'Sorry, it seems that the page you are after has gone missing.', 'generatepress' ) ); ?>
    </p>

    Thanks in advance for you kind assistance.

    Regards

    Max

    #207366
    Tom
    Lead Developer
    Lead Developer

    To center images, the containing element needs to be centered:

    <p style="text-align: center;"><img src="..." /></p>

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.