Centering image in text widget (3 posts)

  1. nsawen
    Posted 2 years ago #

    My website has several pictures in the text widget in the left sidebar.

    Since they are quite small, I have extra space to the right of them.

    How do I center those images or at least "cut" the extra space on the side?

    Here is the screenshot that shows the extra space:

    I have tried adding this to the text widget but without any results:

    <p style="text-align: center;"> IMAGES </p>

  2. batharoy
    Posted 2 years ago #

    Try using margin.
    <p style="margin: 0 auto;"> IMAGES </p>

    Or try setting the <p> in a <div>

    <div style="text-align: center;">
        <p > IMAGES </p>
  3. nsawen
    Posted 2 years ago #

    Thanks, the second solution worked!

    Any way to "shave-off" the excess space on the sides? Tried the margin code but it didn't work.


Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic