Reputation: 1184
My basic layout is a couple of divs within a div - http://jsfiddle.net/nxPhy/ - I'm looking for a css way to have the const div always visible regardless of any horizontal scrolling of the parent div (so only the content div is actually scrolled).
Upvotes: 3
Views: 22541
Reputation: 2910
You want to add:
position:fixed
to the div that you want fixed. Doing this will position this div and it's containing elements fixed.
Upvotes: 1
Reputation: 17010
Add position: relative;
to container, and remove floats and add position: fixed;
to the block you want to fixate.
Result:
Upvotes: 3