I attempted to create this layout using only CSS (no JavaScript, etc.) within an existing HTML page (without altering the HTML code). Unfortunately, I couldn't achieve all the positions that I needed. Let's see if anyone has a better idea. Thanks in advance.
The current HTML structure is as follows (class names are used for illustration purposes):
<body-wrapper>
<logo>
</logo>
<nav>
</nav>
<content>
</content>
<footer>
</footer>
</body-wrapper>
The desired layout looks like this:
|--------------------|
| logo | |
|------| |
| Nav | |
| | content |
| | |
| | |
|------|-------------|
| footer |
|--------------------|
Or like this:
|--------------------|
| logo | |
|------| |
| Nav | |
| | content |
| | |
| | |
| |-------------|
| | footer |
|--------------------|
Note: I prefer not to make changes to the HTML structure (such as adding another div to wrap the logo and nav bar), and only adjust the CSS to achieve the desired layout. Additionally, I do not know the height of these components.
My attempt involved setting width for the Logo and Nav, and using absolute positioning (top = 0, right = 0) for the content. However, the footer ended up moving just below the Nav and overlapping with the content. Any suggestions on how to achieve the desired layout?
Thank you.