How do I main One div fill part of screen? Next to another.
Posted: Tue Mar 08, 2016 8:58 am
This is a difficult question to put in one line.
I'm building a custom page. On some pages the owner can enable a side menu to appear on the left. So I need a div on the left for "sidemenu", and there will be a 'body' div on the right with the main content.
But on other pages they might disable that side menu, so the "body" div goes full width.
I don't want to mess around with multiple DIVs. So while I can set the sidemenu div to be 200px wide for example, how do I do a "float" or "inline-block", so that body div goes next to it, but at the same time, the body can go full width if no sidemenu there?
I'm building a custom page. On some pages the owner can enable a side menu to appear on the left. So I need a div on the left for "sidemenu", and there will be a 'body' div on the right with the main content.
But on other pages they might disable that side menu, so the "body" div goes full width.
I don't want to mess around with multiple DIVs. So while I can set the sidemenu div to be 200px wide for example, how do I do a "float" or "inline-block", so that body div goes next to it, but at the same time, the body can go full width if no sidemenu there?