0

I have a table with content that is larger than its div container.

In IE, the parent containers expand to accommodate the table.

In Firefox, the div container only widens up to a certain size, and I can't seem to make it any wider.

I don't want to use CSS overflow to scroll or clip the content. I want to make the parent containers bigger if the table content is larger.

Below is a fiddle showing what I mean. You have to make your browser window fairly small to see the problem. With IE, the problem seems to show in the fiddle but not when I put the HTML in a file on my computer and open it up.

Example

How can I solve this problem?

Thanks, Tedderz

Tedderz
  • 587
  • 5
  • 16
  • This is a similar question, the answer to which you should find helpful: http://stackoverflow.com/questions/450903/make-css-div-width-equal-to-contents – toniedzwiedz May 24 '12 at 22:45
  • Thanks! That gave me exactly what I needed. If you post this as an answer, I'll give you credit. – Tedderz May 25 '12 at 02:07
  • the other question is easy to find and this one will probably count as a duplicate sooner or later so I think there's no need for a separate answer. I'm just glad I could help. Cheers. – toniedzwiedz May 25 '12 at 15:08

1 Answers1

0

From what I can tell it seems you're having problems with the div not stretching past the right side of the browser when the content stretches. Try setting a min-width or width to the div close to the table width if you can. I noticed someone here: CSS - Make outer <div> background to expand to inner <div> width asked much the same question though they never seemed to find a great solution besides make the outer div bigger explicitly either. Good luck, and I'll post back if I find anything more.

-Adad64

Community
  • 1
  • 1
Adad64
  • 194
  • 3