Programming is all about abstraction management. Doing layouts with JS is using the wrong abstractions. CSS was originally conceived for doing document layouts but it's less suitable for web-application layout. We can leave the discussion here, if the article I posted didn't convince you, nothing probably will.