• Resolved mercedescarter23

    (@mercedescarter23)


    So if you look at my blog it is all just one big grey square I would really like if the main content container and the widgets on the side were separate. Is there some basic CSS code to do this I have searched all over but I don’t think I am using the proper wording.
    UnusuallyImaginative.com

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello mercedescarter23,

    Hope you’re well! 🙂

    The main and sidebar section are separate by default. It is just their parent element was the one use to set the background color. I suggest you use a child theme http://codex.wordpress.org/Child_Themes or use css custom plugin like this: https://wordpress.org/plugins/simple-custom-css/ if you will customize your theme.

    Here is the code ( I left comment for better explanation ) you can put on your child theme’s style.css or use the plugin mentioned above:

    /*
    remove the bg color - this is the parent of main and sidebar element so if you put a color on this the two will be affected
    you can also put a color on this element while main and sidebar have their own color. RESULT: http://prntscr.com/5pg7ng
    */
    .container {
    	background-color: none;
    }
    
    /* this element can have its own bg color */
    #content {
    	background-color: red
    }
    
    /* this element can have its own bg color */
    #sidebar {
    	background-color: green
    }

    Hope it helps! 🙂

    Take care,
    Calvin

    Thread Starter mercedescarter23

    (@mercedescarter23)

    Thanks again Calvin!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Separating main container and sidebar widget.’ is closed to new replies.