aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes CSS element that shouldn't move when I scroll the page Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "CSS element that shouldn Watch "CSS element that shouldn New topic
Author

CSS element that shouldn't move when I scroll the page

Grega Leskovšek
Ranch Hand

Joined: Nov 13, 2008
Posts: 42
I wanted to make an element in CSS that wouldn't move when I scroll the page. Here is my CSS code:
#shoppingcart {
position: absolute;
top: 50px;
left: 40px;
height: 120px;
width: 500px;
background: #eee;
border: 1px solid #444;
}

What else must I do that an element will always remain in a certain position - when I scroll the page etc?

Thanks in advance, Grega from Peace refuge


--Always, Grega from Peace refuge
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
http://www.quirksmode.org/css/position.html

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: CSS element that shouldn't move when I scroll the page
 
Similar Threads
Smart Navigation in jsp
How To Reference a Dynamic DOM Object From JS
display image in fixed place
Position: fixed
IE, javascript, moving to anchors, and setting focus