100% width inside an overflow-x: auto element
I'm trying to simulate a tab control that shows a horizontal scroll bar when need开发者_如何学Ced.
I posted a simplified example here: http://jsfiddle.net/e8My6/
I have a footer div beneath the tabs, which I would like to always extend horizontally to the entire width of the outer, scrolling div.
However, it only takes on the width of the client rectangle of the outer div, rather than all of its contents.
Is there a pure-CSS way to make the footer take the full width?
the 100% must be inherited from something, so you can create a wrapper for all elements in outer div and give it a needed width. then footer will inherit it. but I think you'll be unable to do that so you can assign width with javascript, base on sum of widths of all elements in outer div
精彩评论