I set the sidebar element on the right side of the visible part of the screen (this part already works!). The sidebar consists of several divs. Some of them do not bother me, but the last (lowest) should not "disappear" when the user scrolls down the page. And here I am stuck. In a sense, the top position should not be <0 the visible top of the browser window. Is this possible with CSS and better browsers?
Here is my definition of the sidebar:
div#sidebar{font-size:95%; float: right;width: 150px; margin-top:20px;} div#sidebar div{padding: 5px 0;margin-bottom: 5px}
Here is an element that I would like to keep inside the visible part of the screen:
div#navtop{background:#B3B3E3 url(/css/blue.jpg); margin-bottom:0px;} div#navsoc{background:#B3B3E3 url(/css/blue.jpg); margin-bottom:0px; top:!important 0px;}
The second element, βnavsoc,β should remain visible. But it moves just like navtop and the others that I defined there.
<div id="sidebar"> <div id="navsoc"> keep me inside the window! </div> </div>
source share