I have a dom element like div, span (with display:inline-block), whose width is specified, and is the only (non-trivial) child of another dom element like th, td, div. Is there a way to inherit the width value to the parent?
I have a dom element like div , span (with display:inline-block ), whose width
Share
Just do not set the width of the parent. The browser will sort it out once the widths of the children are worked out, and therefore the
divfor the parent can be calculated by the browser.