Let's start by reviewing the JSFiddle example - check it out here.
The issue lies in the styling and positioning of the div with the class class="overflow-parent"
. Although the class name seems descriptive, this div is actually intended to display the site content.
The horizontal and vertical divs with the red border are meant for navigation features, and the goal is to have the content displayed inside them. Specifically in this example:
- The content (the green-bordered div with a paragraph containing "aaaaa..") should be positioned next to the red vertical menu without overflowing it as it currently does.
- The
class="overflow-parent"
should overflow its parent on the right side only to the size of the screen, rather than creating horizontal scrollbars as seen now.
In addition, I'd like the height of the vertical menu (red-bordered div) to at least match the display height. If the content exceeds the screen's height, the menu's height should adjust to match that of the
<div class="overflow-parent">
, where the page content is displayed.
While I may lack experience in design, the structure and approach presented are my own. There may be more efficient ways to achieve the desired result without these issues, as long as the final appearance remains unchanged.
EDIT
Keeping the navigation centered is crucial, hence the use of the .container
class.
.container {
width: 970px;
padding-left: 0px;
padding-right: 0px;
margin-right: auto;
margin-left: auto;
}
The container needs to remain at a width of 970px
and centered, resulting in white space on both sides. Due to the presence of the vertical menu, the left side will remain empty while I aim to utilize the right side fully without exceeding the screen width.