Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #46209
    Nancy
    Participant

    I am displaying an image on my sidebar using the Image(JetPack) widget. I would like it to be centered in the space and not use the default margins for the sidebar. Is there any Custom CSS that would allow me to change the margin for just one section of the sidebar? (The same thing happens if I use a text widget and paste in the code)

    Website: http://sacredheart.org/School/

    #46246
    Sakin
    Keymaster

    @Nancy: Try the following css:

    .widget.widget_image {
        padding: 0;
        text-align: center;
    }
    .widget_image img {
        border: none;
        display: block;
        margin: 0 auto;
        padding: 0;
    }
    #46259
    Nancy
    Participant

    Thank you! That did the trick.

    Another related question. Is there anyway to make that image track to be the same height as the slider image? I’ve made by graphic the same height as the box and things align nicely when things are full size. As screen size gets smaller, I’d like to be able to have box size as well. Maybe there needs to be a mini slider widget item.

    #46350
    Sakin
    Keymaster

    @Nancy: Not sure what you mean and I am afraid that cannot done easily. So, consider hiring customizer. Thanks.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Custom CCS to change margin in widget – one section only’ is closed to new replies.