Alignment of images in widget

  • Author
    Posts
  • #786762

    Hi,

    I’d like to ask how I can center an image that has been placed in a text widget, without modifying the alignment of images in separate widgets? I’ve tried HTML (class=”align-center”), since the text widget allows you to place HTML in the text box, but I’m realizing that CSS is likely the appropriate solution to this request.

    I do have CSS customization for this blog (brandabel.org).

    Thank You,
    Jeremy

    The blog I need help with is brandabel.org.

    #787005

    1tess
    Moderator Emeritus

    The site linked to your username has been deleted. Please post a link to the blog in question starting with http://

    I’ll move this to the CSS forum.

    #787006

    Thanks for the catch-

    http://brandabel.org

    -Jeremy

    #787050

    WordPress.com themes consistently use class names like “aligncenter” so you could use class=”aligncenter” on the image to align it.

    Another way would be to add a rule to your custom CSS specific to your text widget. To do this, you need to look in the page source to find out what the id for the text widget you want to modify. In your case, it’s “text-4” so you could use this.

    #text-4 {
    text-align: center;
    }

    Another way would be to use the image widget. There is an alignment option built into it.

    #787052

    Thank you, designsimply. I entered the above code into the style sheet editor and it has solved the issue!

    Thanks for sharing the great insight!

    #787053

    Yay. :)

The topic ‘Alignment of images in widget’ is closed to new replies.