How to Center Widgets in Sidebar? (7 posts)

  1. gardibolt
    Posted 3 years ago #

    We are trying to get our site going but have plenty of formatting questions. First one is how to center widgets in the sidebar.

    Here's a sample page:


    The widgets are way off to the right, and we'd like them centered in the sidebar.

    Using 3.4.2, with the current version of the Esplanade theme. I put this into the Custom CSS box on the Design page for Explanade as had been suggested in some earlier threads but it didn't do anything.

    #sidebar ul li {
    text-align: center;

    Second, how do we make the text area of the screen wider? It feels like two-thirds of the screen is blank right now.

  2. Andrew
    Forum moderator
    Posted 3 years ago #

    This article should explain and example CSS for centring elements.

  3. WPyogi
    Forum Moderator
    Posted 3 years ago #

    Looks like your sidebar may have two sections -- so try adding this to your custom CSS:

    #sidebar-right {
        width: 100%;

    Remove the code you posted above as it may cause other problems.

  4. gardibolt
    Posted 3 years ago #

    Beautiful, thanks WPyogi, that did it perfectly.

  5. itdoesnttastelikechicken
    Posted 2 years ago #

    hello, can you help me do the same. I am completely new to editing CSS
    this is what the style css says under the sidebar.php

    <aside class="aside" role="complementary">

    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Right Widget') )#sidebar-right : endif; ?>

    </aside><!-- .aside -->

  6. Andrew
    Forum moderator
    Posted 2 years ago #

    It's worth creating your own thread to discuss your own issues.

  7. itdoesnttastelikechicken
    Posted 2 years ago #

    ok. thanks

Topic Closed

This topic has been closed to new replies.

About this Topic