WordPress.org

Ready to get started?Download WordPress

Forums

Gridiculous
Centering image in text widget (3 posts)

  1. nsawen
    Member
    Posted 5 months 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
    Member
    Posted 5 months 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>
    </div>
  3. nsawen
    Member
    Posted 5 months 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.

    http://pokit.org/get/img/580895028ef54cf0bc36f8189102b938.jpg

Reply

You must log in to post.

About this Theme

About this Topic