WordPress.org

Ready to get started?Download WordPress

Forums

Blaskan
[resolved] Centering Widgets in side bar (1 post)

  1. talentbitsandbytes
    Member
    Posted 1 year ago #

    Hi,

    I thought this might help others if you are trying to edit the CSS code to center all of the widgets within the sidebar, this is the code you enter into the CSS editor:

    .widget {
    	font-size: 15px;
    	padding-top: 20px;
    	text-align: center;
    }
    
    .widget .title {
    	font-size: 20px;
    	font-weight: bold;
    	margin: 0 0 5px;
    	padding: 0;
    	text-transform: uppercase;
    	text-align: center;
    }
    
    .widget ul {
    	list-style: none;
    	margin: 0;
    	text-align: center;
    }
    
    .widget li {
    	padding: 0 0 5px;
    	text-align: center;
    }
    
    .widget li:last-child {
    	padding: 0;
    	text-align: center;
    }
    
    @media only screen and (max-width: 1200px) {
    	.sidebars #secondary .widget:first-child {
    		padding-top: 20px;
    		text-align: center;
    	}
    }
    
    @media only screen and (max-width: 992px) {
    	.sidebar #primary .widget:first-child,
    			.sidebars #primary .widget:first-child {
    		padding-top: 20px;
    		text-align: center;
    	}
    }

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic