position-fixed

Why do fixed elements slow down scrolling in Firefox?

My question is simple, why do elements with the CSS "position: fixed" applied to them cause Firefox to eat 100% CPU when scrolling the page they are in? And are there any workarounds? I've noticed this behaviour on a few sites, for example the notification bar at the top of the page on stackoverflow. I'm using Linux in case that matters...

Simulating position: fixed in IE6 with a div of 100% height?

Hey, I have a sidebar on my webpage that is supposed to span 100% of the page (vertically). It is then supposed to stay there, so when the rest of the content scrolls it does not. To do this, I used: body { height: 100%; } #sidebar { height: 100%; width: 120px; position: fixed; top: 0; left: 0; } This works g...

position a fixed element relative to a containing element

Here is what I got so far. This effect is exactly what I want, except the position is obviously off. CSS: #rightDiv{ position: absolute; top: 200px; margin-left: 530px; } #membership{ text-align: center; height: 400px; z-index: 5; width: 329px; position: absolute; top: 190px; } #membership...

center aligning a fixed position div

I'm trying to get a div that has position:fixed center aligned on my page. I've always been able to do it with absolutely positioned divs using this "hack" width:400px; left:50%; margin-left:-200px where the value for margin-left is half the width of the div. This doesn't seem to work for fixed position divs, instead it just places t...

Div with scrollbar inside div with position:fixed

I have a div with position:fixed that is my container div for some menus. I've set it to top:0px, bottom:0px to always fill the viewport. Inside that div I want to have 2 other divs, the lower one of which contains lots of lines and has overflow:auto. I would expect that it would be contained within the container div, but if there are to...

How can I style an HTML INPUT tag so it maintains CSS when focused on Android 2.2+?

I was delighted to discover that Android 2.2 supports the position:fixed CSS selector. I've built a simple proof-of concept, here: http://kentbrewster.com/android-scroller/scroller.html ... which works like a charm. When I attempt to add an INPUT tag to my header, however, I hit trouble. On focus, every device I've tried so far clone...

How can I keep a fixed element contained inside a relative element?

I have a fixed element (div) that I want to scroll with my page. However, when the fixed element reaches the end of the container (div) I want it to stop scrolling with the page. I'm trying to do this with CSS, or is jquery my best option? ...

Why are statically positioned children of a fixed position element gaining width?

UPDATE: This seem to only be an issue with ul/li if i replace the ul with a div and remove the li and apply the relevant style to the a's instead its fine. ID' still liek to know why the ul/li structure presents a problem since margin/padding have been reset explicitly. Im having soem trouble with the children of a fixed position ele...