I am generating the Html in Excel sheet and entire table is fine and except the
two cells are much wider. How do I reduce the width of those cells. I tried changing
the width and everything but no use. It works fine on Html table. On Excel spreadsheet it looks different.
I am generating the Html in Excel sheet and entire table is fine and
Share
Well, Chrome v6.0.472.62 and Firefox 3.6.10, both on Ubuntu 10.04, allow:
the
max-widthseems to be the important part, preventing the cell from growing. Also thewhite-space: nowrapis important if you don’t want the cell to wrap the contents within the definedwidth.There’s a demo over at jsbin.com, I’ve not hidden the overflow on the overflowing cell, deliberately so that you could see it in effect, though in real use you’ll need to work out some way of showing the actual contents of the cell without it obscuring the content of its neighbours.