I've successfully used the beautiful Susy grid system to create a responsive layout similiar to the one of WebDesignerWall.com:
What i failed to implement is a position:fixed
sidebar.
Such a sidebar would not scroll when the page is scrolled and stays on the same place. That's fantastically convenient (anyway, you actually can't put more content into the sidebar, because it would clutter the top of page in a narrow window).
My layout goes crazy whenever i apply position:fixed
to a column:
The colored blocks are declared three-column wide, but stretch further when position:fixed
is applied to the sidebar..
I think the problem is that the width of the sidebar is relative, i. e. set in percentage. Due to position:fixed
, the width is measured against the width of the browser window, not its container (though i set the container to position:relative
).
The question is: how do i make a column fixed to the window while measuring its width against its container, not the viewport?
Maybe it's possible to fix the position of an element with JS?
PS I've tried the width: inherit
solution, but it wasn't of any help to my situation.