This is an old story. Many web developers met similar problems, to make an element occupy leftover space of it's parent. Unfortunately, we are not able to do it through HTML/CSS. Some method may work for a specific browser, but it won't work for all browsers. I tried quite a few methods, none of them works for IE, Firefox and Chrome. We have to use Javascript here.
Note, when you adjust element size according to it's parent, you should be aware that offsetWidth and offsetHeight are not exactly same with style.width and style.height. See http://yijinliu.blogspot.com/2009/07/padding-and-margin.html.
Saturday, July 11, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment