Center an image in a Text Widget

  • Unknown's avatar

    Hello,

    I would like to center an icon in one of my sidebar widgets.

    It is the ‘Pinterest’ icon in a Text widget (titled ‘Inspiration’) in the sidebar of my Blog page. (I put it in a text widget because I have added script that enables people to click on the icon and go to my Pinterest page in a new window.)

    Thank you!
    Eli

    The blog I need help with is: (visible only to logged in users)

  • Hi Eli,

    Tried to visit your blog but it’s set to private. I’m one of the volunteers here so can’t view a blog if it’s private, consequently can’t try and suggest any CSS code either.

    If it’s indeed the intended behavior and visibility of the blog, one of the Staff members will be here to assist you, as they’re the only ones who can view private blogs.

  • Unknown's avatar

    Hi Eli, give the following a try.

    #image-32 {
        text-align: center;
    }
    #image-32 p {
        text-align: left;
    }
  • Unknown's avatar

    Hi,
    Thanks for the suggestion – I copied and pasted that script into the CCS for the sidebar Text widget, but the Pinterest icon didn’t centre. I just pasted it into the bottom of the script – is that where it should go?

    Thank you,
    Eli

  • Unknown's avatar

    You paste it into the CSS editor at Appearance > Customize > CSS.

  • The topic ‘Center an image in a Text Widget’ is closed to new replies.