skip to Main Content

I am trying to hide the sidebar for mobile devices in my WordPress site with the Divi theme. I have tried to use media queries to do this but it hasn’t worked.

My media query:

@media (max-width:480px) {
    .menu-decoglobofx-container {
        display:none;
    }
}

I have also tried the plugin Hide Widgets and the sidebar still displays when I test the page on my mobile device try it yourself and see. Does anyone know how to get this to work properly?

2

Answers


  1. Change this in css:

       @media (max-width: 479px)
    .et_pb_section .et_pb_row .et_pb_column.et_pb_column_1_4 {
        width: 100% !important;
        margin: 0 0 30px 0;
    
    }
    

    with:

     @media (max-width: 479px)
    .et_pb_section .et_pb_row .et_pb_column.et_pb_column_1_4 {
        width: 100% !important;
        margin: 0 0 30px 0;
        display:none;
    
    }
    
    Login or Signup to reply.
  2. This should do good .. just use it with proper page_id

       @media all and (max-width: 479px) {
        .et_pb_sidebar_0 {
        display:none !important;}
        }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search