Skip to main content
davidhelp
Inspiring
October 31, 2020
Answered

DIV does not expand all the way as browser windows is resized

  • October 31, 2020
  • 1 reply
  • 493 views

Hello

Question: Why does the left column (orange) not expand all the way to the right when the browser window is made smaller by either dragging the computer browser window or viewed in a cell phone?

How to fix?
Test site to view code:  http://www.davidshelpsite.com

    This topic has been closed for replies.
    Correct answer osgood_

    You have a redundant curly bracket in your css, directly before the #right_column media query below - marked in red: (Remove it and your right column WILL then be 100% of its parent container)

     

    }
    @217338screen and (max-width: 768px) { /* this stops the div from expanding beyond max-width */

    #right_column{
    flex-basis: 100%;
    }
    } /* Must have 2 curly brackets for media screen */

     

     

    1 reply

    davidhelp
    davidhelpAuthor
    Inspiring
    October 31, 2020

    Correction...... Why does the right column (orange) not expand all the way to the right when the browser window is made smaller by either dragging the computer browser window or viewed in a cell phone?

    osgood_Correct answer
    Legend
    October 31, 2020

    You have a redundant curly bracket in your css, directly before the #right_column media query below - marked in red: (Remove it and your right column WILL then be 100% of its parent container)

     

    }
    @217338screen and (max-width: 768px) { /* this stops the div from expanding beyond max-width */

    #right_column{
    flex-basis: 100%;
    }
    } /* Must have 2 curly brackets for media screen */

     

     

    davidhelp
    davidhelpAuthor
    Inspiring
    October 31, 2020

    Thanks