Title: Center sidebar widgets
Last modified: August 31, 2016

---

# Center sidebar widgets

 *  [moxsum](https://wordpress.org/support/users/moxsum/)
 * (@moxsum)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/center-sidebar-widgets/)
 * Hey guys – so im trying to center all the sidebar widgets on my site.. Been trying
   different things with the CSS but nothing seems to work.. im using the “Signature”
   theme if that helps..
 * This is the website im working on;
 * [http://www.prettylittleshoppers.com/](http://www.prettylittleshoppers.com/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Thread Starter [moxsum](https://wordpress.org/support/users/moxsum/)
 * (@moxsum)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/center-sidebar-widgets/#post-7231459)
 * Does anyone know the right CSS code to use to to this? I just want everything
   on the sidebar to be centered… I could go into each widget in and put a <center
   ></center> tag but that seems silly…. and not the most correct way of doing things.
   I tried using text-align: center; margin-left: auto; margin-right: auto; on various
   containers in the CSS but nothing seemed to work.. help? 🙂
 *  [paulwpxp](https://wordpress.org/support/users/paulwp/)
 * (@paulwp)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/center-sidebar-widgets/#post-7231461)
 * We can use this code to achieve that
 *     ```
       #main .widget-area ul { text-align: center; }
       #main ul#pretty-pinterest-pins-widget li.pretty-pinterest-pin div.pretty-pinterest-image { margin-left: auto; margin-right: auto; }
       ```
   
 * The second line of code shouldn’t be necessary long but since the pinterest plugin
   use this selector so we have to use the same to be able to override it.
 * Use the code in Jetpack’s Custom CSS module (or via any standalone Custom CSS
   plugin).
 *  Thread Starter [moxsum](https://wordpress.org/support/users/moxsum/)
 * (@moxsum)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/center-sidebar-widgets/#post-7231606)
 * Thank you @paulwpxp you are a magical unicorn of awesomeness.. yes that worked
   perfectly……. EXCEPT, the only section thats still not centered is the social 
   buttons bar unerneath the profile photo, it has a couple divs in it, maybe thats
   the problem. I tried wrapping it in a div with text-align: center; margin-right:
   auto; margin-left: auto; but it didnt work.. tried a few other things too.. any
   idea?
 * see: [http://www.prettylittleshoppers.com/](http://www.prettylittleshoppers.com/)
 *  [paulwpxp](https://wordpress.org/support/users/paulwp/)
 * (@paulwp)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/center-sidebar-widgets/#post-7231613)
 * This will fix it, also included the **.circular** to make the profile pic round
   in all screenwidth (currently it’s not).
 *     ```
       .facebook, .email, .twitter, .pin, .inst { display: inline-block; float: none; }
       @media screen and (min-width: 1024px) { .facebook, .email, .twitter, .pin, .inst { width: 40px; height: 40px; } }
       .circular { width: 100%; height: auto; }
       ```
   
 * Code will work only if used in Custom CSS plugin (because it must be loaded after
   theme’s main stylesheet so that it can override the default).
 *  Thread Starter [moxsum](https://wordpress.org/support/users/moxsum/)
 * (@moxsum)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/center-sidebar-widgets/#post-7231639)
 * Hey Paul!
 *  Thanks for the code.. hmm.. the social buttons still dont seem to be centered..
   also, the circular profile pic.. now it looks a little more like an oblong shape
   then a circle when I add your code? Take a look; [http://www.prettylittleshoppers.com/](http://www.prettylittleshoppers.com/)
 *  [tech55541](https://wordpress.org/support/users/tech55541/)
 * (@tech55541)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/center-sidebar-widgets/#post-7231641)
 * Hello,
    The reason the social icons have not been centered is because
 *     ```
       display: table;
       ```
   
 * is missing from the CSS, please try the below CSS code.
 *     ```
       #main ul#pretty-pinterest-pins-widget li.pretty-pinterest-pin div.pretty-pinterest-image { margin-left: auto; margin-right: auto; display: table; }
       ```
   
 * Thanks.
 *  [paulwpxp](https://wordpress.org/support/users/paulwp/)
 * (@paulwp)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/center-sidebar-widgets/#post-7231642)
 * [@moxsum](https://wordpress.org/support/users/moxsum/) , Use image that’s square
   in proportion, right now the image dimension is 976×1050 which is not square.
 *  Thread Starter [moxsum](https://wordpress.org/support/users/moxsum/)
 * (@moxsum)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/center-sidebar-widgets/#post-7231645)
 * [@tech55541](https://wordpress.org/support/users/tech55541/) The pinterest plugin
   is centered fine… its the icons below the circular profile photo are not totally
   centered.. I think the issue is they are each their own little image, so the 
   whole thing needs to be centered as a block…. or if there was just a little spacing
   to the left of the first image it would be centered probably..
 * @paulwpxp Thank you! Ok that makes sense.. I will make it square… any idea why
   the code didnt center the social icons?
 *  [Jeffrey Carandang](https://wordpress.org/support/users/phpbits/)
 * (@phpbits)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/center-sidebar-widgets/#post-7231688)
 * Seems like you’ve already figured it our 🙂 Glad the help works perfectly. For
   any other users you may want to try this plugin first : [https://wordpress.org/plugins/widget-options/](https://wordpress.org/plugins/widget-options/).
   I’ve added widget alignment option 🙂
 * Cheers!

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Center sidebar widgets’ is closed to new replies.

## Tags

 * [center](https://wordpress.org/support/topic-tag/center/)
 * [sidebar](https://wordpress.org/support/topic-tag/sidebar/)
 * [widget](https://wordpress.org/support/topic-tag/widget/)

 * 9 replies
 * 4 participants
 * Last reply from: [Jeffrey Carandang](https://wordpress.org/support/users/phpbits/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/center-sidebar-widgets/#post-7231688)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
