Can someone provide guidance on creating a layout that includes a top menu bar area, along with a split 75/25 screen featuring a fixed and covering background?
--------------------------------------------------------
| |
--------------------------------------------------------
| | |
| | |
| | |
| | |
| | |
| | |
--------------------------------------------------------
The main left-hand area should scroll vertically like a normal webpage.
The top menu bar should also scroll with the main content.
However, the right-hand area needs to have a fixed background that scales and covers the entire region (utilizing the CSS cover property) without scrolling.
I've been able to achieve some parts of this layout separately but struggling to get everything to work together seamlessly!
Currently, I'm facing an issue where the background image in the RHS area is not positioning correctly within the block. The backgrounds are in place and fixed, but the RHS background doesn't seem to fit perfectly:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
html {
height: 100%;
width: 100%;
}
body {
height: 100%;
width: 100%;
margin: 0px;
padding: 0px;
}
.lhs {
width: 75%;
float: left;
background: url(lhs_bg.jpg) repeat left top;
}
.rhs {
width: 25%;
float: right;
background: url(rhs_bg_1.jpg) no-repeat left center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
</style>
</head>
<body>
<div class="lhs">
lhs
...(content for lhs)...
</div>
<div class="rhs">
rhs
...(content for rhs)...
</div>
</body>
</html>
The numbers indicate the vertical scrolling behavior in both areas to demonstrate how the page extends beyond the browser height.
It seems like the background image in the RHS area is still sizing to cover the full screen rather than just fitting the parent div element. As a result, only a part of the image is visible in the RHS area instead of the complete image coverage.
Any suggestions or tips to resolve this issue would be greatly appreciated!