Title: Sidebar padding
Last modified: August 21, 2016

---

# Sidebar padding

 *  Resolved [chappie](https://wordpress.org/support/users/chappie/)
 * (@chappie)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/sidebar-padding-3/)
 * Having given my sidebar a background color, I needed to move all titles, icons,
   widget text and any other content away from the left and right edges of the container.
   The code I used did the job perfectly – but it also changed the margins in my
   FP and footer widget areas, causing havoc:
 *     ```
       /*  Widget area padding */
       .widget-area {
       margin-left: 5%;
       margin-right: 5%;
       }
       ```
   
 * Could anyone please tell me how I can exempt the other parts of my page from 
   this code? I tried using padding-left/right instead but it had no effect on my
   sidebar.
 * Thank you.

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

 *  Thread Starter [chappie](https://wordpress.org/support/users/chappie/)
 * (@chappie)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/sidebar-padding-3/#post-4424796)
 * I’ve found the `:not` selector which looks handy. Is that is the right way to
   go about this — although I might have trouble if the non-sidebar elements on 
   my page have variable margin settings since the `:not` syntax requires me to 
   apply my code in reverse, ie apply a value to all other elements which aren’t`.
   widget-area` so that I can apply a different value to `.widget-area`. Hopefully,
   it doesn’t have to be this complicated.
 *  [rdellconsulting](https://wordpress.org/support/users/rdellconsulting/)
 * (@rdellconsulting)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/sidebar-padding-3/#post-4424920)
 * Did you try using .left & .right?
 * `.left .widget-area, .right .widget-area {...}`
 * Then margin/padding should work
 *  Thread Starter [chappie](https://wordpress.org/support/users/chappie/)
 * (@chappie)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/sidebar-padding-3/#post-4424922)
 * Yay! Thank you, Dave.
 * Now I’m annoyed with myself for not engaging logical brain last night. But it*
   was* late.

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

The topic ‘Sidebar padding’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/customizr/4.4.24/screenshot.png)
 * Customizr
 * [Support Threads](https://wordpress.org/support/theme/customizr/)
 * [Active Topics](https://wordpress.org/support/theme/customizr/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/customizr/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/customizr/reviews/)

## Tags

 * [chappie](https://wordpress.org/support/topic-tag/chappie/)
 * [Indent](https://wordpress.org/support/topic-tag/indent/)
 * [margin](https://wordpress.org/support/topic-tag/margin/)
 * [padding](https://wordpress.org/support/topic-tag/padding/)
 * [sidebar](https://wordpress.org/support/topic-tag/sidebar/)
 * [widget](https://wordpress.org/support/topic-tag/widget/)

 * 3 replies
 * 2 participants
 * Last reply from: [chappie](https://wordpress.org/support/users/chappie/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/sidebar-padding-3/#post-4424922)
 * Status: resolved