I know that position: fixed
makes an element relative to the viewport instead of it's offsetParent
however I have an issue where I have a side element which takes x
amount of space and then some fixed position heading elements which I want to take up a percentage of the remaining viewport width.
See fiddle: http://jsfiddle.net/U5DSZ/
Now I could put all the h1
element's into their own container but then they lose their semantic meaning as they are no longer associated with their content.
I understand JavaScript could do this but I am against using JavaScript for page structure.
Is there a way to do this in a purely HTML or CSS way? I don't mind moving the h1
element's as long as they retain their relationship with the content and the content remains statically positioned.