puh, i hope the title is not as confusing as it sounds. I'll try my best to explain since i cant post an image:
I want the left div to be fixed in width and contain some content like the usual website. The right div is supposed the be responsive to the browser window size (stretch over the rest width and complete hight) and non scrollable. Here is what i tried:
.left {
width: 200px;
background: grey;
float: left;
}
.right {
background: black;
color: white;
position:fixed;
left:200px;
width: 100%;
height: 100%;
text-align: center;
}
<div class="left">
left content, scrolling, fixed width<br>
left content, scrolling, fixed width<br>
left content, scrolling, fixed width<br>
left content, scrolling, fixed width<br>
left content, scrolling, fixed width<br>
left content, scrolling, fixed width<br>
</div>
<div class="right">
right content, fixed position,content centered, fills the 'rest' of the screen
</div>
problem is that this way i can't center content because the right div takes the whole bodys width and the content centers 'correctly' to far to the right.
you could sized your
fixed
element (as much asabsolute
elements) via coordonates only: demo