Petah Petah - 4 months ago 49
CSS Question

Why doesn't position: sticky work in Chrome?

How do you get

position: sticky
working?

I tried the following in Chrome 26.0.1410.43 m and it's not working:

thead {
position: -webkit-sticky;
position: -moz-sticky;
position: -ms-sticky;
position: -o-sticky;
position: sticky;
top: 10px;
}


http://jsfiddle.net/8LRms/

According to this, it should work:

http://updates.html5rocks.com/2012/08/Stick-your-landings-position-sticky-lands-in-WebKit

It seemed to be supported in Chrome 23.0.1247.0, but now it doesn't work in 26.0.1410.43 m.

Answer

EDIT: You need to launch with --enable-experimental-webkit-features flag enabled via about:flags.

Update: This does not work on Chrome v35 through v51, Chrome 52 reenables this with the experimental web platform features flag.

Comments