i want to have an element inside a div set to height 100%. The element (an ul Element) must be set relative. The list items are set absolute but in reference to the parent element.
See the example: http://jsfiddle.net/mbecker/ee78G/2/
How to set the green ul Element to 100% height?
Thanks in advance!
I removed the
height: auto !importanton#main. Then, I was able to setheight: 100%to#list.I’m not sure if the
height: autois necessary though.http://jsfiddle.net/KBHcs/
To give more explanation, the
height: auto !importantmakes the content define the height of the element and the !important was overwriting theheight: 100%. In this case, the “sd” was the only thing in theulas theliare absolutely positioned, and therefore, are not part of the document flow.