[Resolved] Center image in sidebar?

Home Forums Support Center image in sidebar?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1028736
    Carol

    Is there a way to center an individual image in the sidebar with settings in the theme?

    Thank you.

    X80Ws+031v45

    #1028743
    Leo
    Staff
    Customer Support

    Hi there,

    CSS is required. I assume you are talking about the first image widget?

    Try this CSS:

    .sidebar .widget_media_image {
        text-align: center;
    }

    Let me know if this helps 🙂

    #1028745
    Carol

    Yes, the book image.

    What does this code do – center just first occurance in sidebar or center all the sidebar or what?

    Thank you so much!

    #1028748
    Leo
    Staff
    Customer Support

    This CSS?

    @media (min-width: 769px) {
        .post-image-aligned-left .post-image img {
            max-width: 405px;
        }
    }

    That’s setting the max-width of featured image to 405px on desktop view – irrelevent to the sidebar.

    #1028753
    Carol

    No, the one you just gave me now:

    .sidebar .widget_media_image {
    text-align: center;
    }

    Does this just affect one image (first widget in sidebar), or all of them or what?

    Thank you.

    #1028763
    Leo
    Staff
    Customer Support

    It will center all image widgets added in sidebar. You currently only have one image widget.

    #1028773
    Carol

    Right – I guess that’s okay for now. If I come to a situation where I want one to left or right align, will come back. 🙂

    #1028801
    Leo
    Staff
    Customer Support
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.