Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #1188400

    Hi,

    I am trying to change the background color of the left sidebar to a light grey color. I tried to follow the code from here: https://kriesi.at/support/topic/sidebar-background-colour/ , but the sidebar ended up overlapping the main content.

    I hope you can help!

    Best regards,
    Susanne

    #1188636

    Hey Telmore,

    Could you please give us a link to your website, we need more context to be able to help you.

    Best regards,
    Victoria

    #1188784
    This reply has been marked as private.
    #1189116

    Hi,
    Thank you for the login, I see this is not a true sidebar and is a 1/4 column, which is fine, but will this also be on other pages or only on this one? If you add this to other pages please add a custom class to them all so the same css with work on all of them.
    2020-02-29-165229
    I see that some of your other pages have a true sidebar, do you want the background color changed for those too?
    For the page you linked to, Please try this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:

    #main > div > div.flex_cell.no_margin.av_one_fourth {
    	background-color: #dddddd;
    }

    After applying the css, Please clear your browser cache and check.

    Best regards,
    Mike

    #1189378

    Hi Mike,

    Yes, I think I accidentally came to change the sidebar to a column for the page I linked to. I have changed it back to an actual sidebar. It is the true sidebar I want to change the background color of.

    Best regards,
    Susanne

    #1190033

    Hi,
    Sorry for the late reply, Please try this code in the General Styling > Quick CSS field or in the WordPress > Customize > Additional CSS field:

    #main > div.main_color.container_wrap_first.container_wrap.sidebar_left > div {
    	    background-color: gray;
    }
    #main > div.main_color.container_wrap_first.container_wrap.sidebar_left > div > main {
    	background-color: #fff !important;
    }

    After applying the css, Please clear your browser cache and check the url in the Private Content area.

    Best regards,
    Mike

    #1190886

    Hi Mike,
    It works like a charm!

    Thanks for the help :)

    Best regards,
    Susanne

    #1190908

    HELLO MIKE : please change your image-hoster – it is horrible

    popups and other nefarious sites as they all open up – not always – but more and more often. Also the Kriesi page will be closed etc. pp.
    Please!

    ________

    On Ismaels code i see there was a little inconsitency: if there is a color-section with background-image on top – like here f.e:
    https://kriesi.at/themes/enfold-2017/blog/blog-single-author-small/ his code will end in a colorized top color-section too:
    So we can use an attribute selector – only if there was no background-image on container.wrap the code will do the job:

    @media only screen and (min-width: 768px) {
      .container_wrap.sidebar_right:not([style*="background-image"]):before {
          content: '';
          display: block;
          position: absolute;
          right: 0;
          top: 0;
          background: #ddd;
          height: 100%;
          width: calc(30%);
      }
    }

    if you got sidebar left the change it to: .container_wrap.sidebar_left.

    #1191025

    Hi,

    @Guenni007
    thanks for letting me know about the popups, I’ll look for a new image host.
    Also thanks for the updated css.

    Best regards,
    Mike

    #1191443

    Hi Mike,

    Sorry, there still seem to be an issue with the background color of the sidebar. In the attached image you can see that it is only a part of the sidebar that have gained the grey color. I would like the whole sitebar to be grey.

    Best regards,
    Susanne

    #1192188

    Hi,
    Thank you for the screenshot, the white area to the left of your sidebar is the background of the page, your page has a max-width of 1610px, so on screens above that the page background is seen typically evenly on both sides.
    so you could go to Enfold Theme Options > General Layout > Dimensions and change your max-width
    2020-03-11_043455.png
    or you could use this css to change the background color of the background, but on very large screens the background may also show on the far right side:

    #main > div.main_color.container_wrap_first.container_wrap.sidebar_left > div,#main > div.main_color.container_wrap_first.container_wrap.sidebar_left {
        background-color: lightgray;
    }

    Best regards,
    Mike

    #1192252

    Hi Mike,

    Thank you! It worked perfectly :)

    Best regards,
    Susanne

    #1192357

    Hi Susanne,

    Glad we could help :)

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #1192432

    with the code of ismael mentioned here: Link
    and my little added selector
    the whole sidebar is colorized ( till footer) : ( you have only to adjust the percentage to your enfold width options.

    #1192501

    Hi,

    Thanks for sharing and helping out @guenni007.

    Best regards,
    Rikard

    #1193235

    Yes but – it is not quiet easy as i thought first:
    if this is the setting: https://kriesi.at/support/topic/change-bacground-color-of-sidebar/#post-1192188
    we have for the content: 1310px because of left right padding of 50px.
    for the : template-page content it is : 956,3px (73% of 1310px)
    and for aside : 353,7px (27% of 1310px) but this ends on the right side without padding – if you want to colorize it looks better if you do a “pseudo padding” more background as the width of it is f.e. the 50px

    hope you all will understand the calculations with the given comments:

    /**** just for that example page 
    ***** don't know why there is container set to 95% 
    ***** so i first set it to 100% because it is better to understand
    ***** and 1410px with 50px padding left and right 
    ***** so template width is 1310px - content is 73% of that - aside ist 27%
    *****  ****/
    
    .container {
        width: 100% !important;
    }
    
    @media only screen and (min-width: 1410px) {
      .container_wrap.sidebar_right:not([style*="background-image"]):before {
          content: '';
          display: block;
          position: absolute;
          left: calc(50vw + 0.23*1310px);  
          top: 0;
          background: #ddd;
          height: 100%;
          width: calc(0.27*1310px + 50px);     /** 27% of 1310px + 50px   ** looks better **/
      }
    }
    
    /**  in case it should cover the whole background from aside start to screen width end  
    @media only screen and (min-width: 1410px) {
      .container_wrap.sidebar_right:not([style*="background-image"]):before {
          content: '';
          display: block;
          position: absolute;
          left: calc(50vw + 0.23*1310px);
          top: 0;
          background: #ddd;
          height: 100%;
          width: calc(50vw - 0.23*1310px);
      }
    }
    ***/
    
    @media only screen and (max-width: 1409px) {
      .container_wrap.sidebar_right:not([style*="background-image"]):before {
          content: '';
          display: block;
          position: absolute;
          right: 0 ;
          top: 0;
          background: #ddd;
          height: 100%;
          width: calc(0.27*(100vw - 100px) + 50px)
      }
    }
    
    @media only screen and (max-width: 767px) {
      .container_wrap.sidebar_right:not([style*="background-image"]):before {
          display: none
      }
    }
    #1193239

    Hi,
    Thank you, that makes sense.

    Best regards,
    Mike

Viewing 17 posts - 1 through 17 (of 17 total)
  • You must be logged in to reply to this topic.