Title: customize sidebars (width)
Last modified: August 17, 2021

---

# customize sidebars (width)

 *  Resolved [marcodurigon14](https://wordpress.org/support/users/marcodurigon14/)
 * (@marcodurigon14)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/customize-sidebars-width/)
 * Hello, can you help me customize the width of the sidebars? For example, I would
   like the left sidebar (menu) closer and leave more space for the central column(
   contents). Thank you
    md
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcustomize-sidebars-width%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Theme Author [PressMaximum](https://wordpress.org/support/users/pressmaximum/)
 * (@pressmaximum)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/customize-sidebars-width/#post-14778530)
 * Hi,
 * You can try to use this custom CSS code in Appearance > Customize > Additional
   CSS, to adjust the width of the main content and sidebars
 *     ```
       @media (min-width: 1200px) {
           #sidebar-primary {
               flex-basis: 20%;
               max-width: 20%;
           }
           #main {
               flex-basis: 60%;
               max-width: 60%;
           }
           #sidebar-secondary {
               flex-basis: 20%;
               max-width: 20%;
           }
       }
       ```
   
 * The total percentage should be 100%.
 *  Thread Starter [marcodurigon14](https://wordpress.org/support/users/marcodurigon14/)
 * (@marcodurigon14)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/customize-sidebars-width/#post-14780356)
 * Thanks, the css is correct, but it is also applied in the internal pages where
   the sidebars are two (and where I have applied a specific css for the margins).
   Is it possible to correct the code so that it only applies to the home?
 *  Theme Author [PressMaximum](https://wordpress.org/support/users/pressmaximum/)
 * (@pressmaximum)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/customize-sidebars-width/#post-14788313)
 * Hi,
 * If you want to apply the CSS code to the homepage only, please add the class `.
   home` before the selector, like this
 *     ```
       @media (min-width: 1200px) {
           .home #sidebar-primary {
               flex-basis: 20%;
               max-width: 20%;
           }
           ...
       }
       ```
   
 *  Thread Starter [marcodurigon14](https://wordpress.org/support/users/marcodurigon14/)
 * (@marcodurigon14)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/customize-sidebars-width/#post-14793177)
 * perfect! Thanks a lot
    m

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

The topic ‘customize sidebars (width)’ is closed to new replies.

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

 * 4 replies
 * 2 participants
 * Last reply from: [marcodurigon14](https://wordpress.org/support/users/marcodurigon14/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/customize-sidebars-width/#post-14793177)
 * Status: resolved