开发者

CSS fixed div within container

How do I have fixed div contained within a div.container, where the fixed div is ONLY fixed within the div.container (and not the rest of the page)? That means if I scroll down the page, outside of the container div, the fixed div does not scroll. It's hard to explain, see this example: http://开发者_开发知识库jsfiddle.net/jg8qJ/


give

.container { 
    position:relative; 
} 

and set

.info { 
    position:absolute; 
    top:0; 
    left:0;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜