I have a table with 2 rows and variable columns. I tried width = 100% for the column. So the first content in the view will fit. But suppose if i am changing the contents dynamically then it is not dynamically increase/decrease the HTML table column size.
Thanks in advance.
Html – How to Auto resize HTML table cell to fit the text size
csshtml
Related Topic
- Html – How to auto-resize an image to fit a ‘div’ container
- Html – How to set the default value for an HTML
- Html – How to reformat HTML code using Sublime Text 2
- Html – CSS background image to fit width, height should auto-scale in proportion
- CSS text-overflow in a table cell
- Html – Fit cell width to content
- Html – How to get the
in HTML tables to fit content, and let a specific fill in the rest - Html – Why don’t flex items shrink past content size
Best Answer
If you want the cells to resize depending on the content, then you must not specify a width to the table, the rows, or the cells.
If you don't want word wrap, assign the CSS style
white-space: nowrap
to the cells.