Skip to main content
davidhelp
Inspiring
Oct 31, 2020 7:16 AM UTC
Answered

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

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 is closed to new replies. Start a new post to keep the conversation going.
    osgood_Correct answer
    Legend
    Oct 31, 2020 9:37 AM UTC

    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 */

     

     

    4 replies

    davidhelp
    davidhelpAuthor
    Inspiring
    Oct 31, 2020 8:13 AM UTC

    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?

    Translate
    osgood_Correct answer
    Legend
    Oct 31, 2020 9:37 AM UTC

    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 */

     

     

    Translate
    davidhelp
    davidhelpAuthor
    Inspiring
    Oct 31, 2020 5:25 PM UTC

    Thanks

    Translate