Custom CSS to centre side bar info

  • Unknown's avatar

    I have recently launched a blog called the Bridal Bible and would like to customise the widgets. As you can see the widget headings are centered but the information below the headings isn’t, making it look a little untidy. Does anyone have a code that I can use to:

    – center the image and text in the text widget (the first section of the sidebar)
    – email subscription button and main text
    – contact information in the footer.

    Any help would be greatly appreciated.

    Thanks :)

    Kaz

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

  • This style centers the text in any widget:

    .widget {
    text-align: center;
    }

    Please add it and let me know. :-)

  • Unknown's avatar

    That worked, thank you, but it didn’t center the image.

  • I think the images on the widgets are already centered.

  • Unknown's avatar

    I think the images look centered because they are max-width for the size of the sidebar container at the moment.

    I noticed some of the images, such as the instagram shot with the to do list in it, are not centered. To force all images in all of the widgets to be centered, you can add this to your Appearance > Customize > CSS editor:

    .widget img {
    	display: block;
    	float: none;
    	margin: 0 auto;
    }
  • The topic ‘Custom CSS to centre side bar info’ is closed to new replies.