CSS fixed div within container

css
14,899

give

.container { 
    position:relative; 
} 

and set

.info { 
    position:absolute; 
    top:0; 
    left:0;
}
Share:
14,899
atp
Author by

atp

Updated on July 20, 2022

Comments

  • atp
    atp over 1 year

    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/

  • Jared over 9 years
    @user2745266 Start a new question and provide your example.