I\'m trying to give a fixed element a width
of a percentage parent (here #container
). When I use pixel instead of the percentage then it works
It seems as though the static value (250px) can be propagated through normal inheritance. Whereas when the relative value (90%) is being used, the fixed div has already been taken out-of-flow, and now inheritance-wise, it's parent is the viewport. It seems to me that you're going to have to use good old js.
But, this question is months old now, so it probably doesn't matter either way.