How can I make the table with 2 columns (cells) look like this:
Example:
<table style="width: 500px;"> <tr> <td>foo</td> <td>bar</td> </tr> </table>
I need the table to look like this:
.___________________________________________________________________________. | foo | bar <a lot of space here> | |_____|_____________________________________________________________________| 500 px total width
Notice: I don't know the width of "foo" so I cannot set "50px", "10%" or something like that.
In "Table Tools" click the [Layout] tab > locate the "Cell Size" group and choose from of the following options: To fit the columns to the text (or page margins if cells are empty), click [AutoFit] > select "AutoFit Contents."
remove all widths and add . content-loader table tr td { white-space: nowrap; } ? Since you have a fixed width for the container, you have too many fields inside of it to fit properly. If you had less it probably would have adjusted on its own.
To prevent cells (rows) from expanding vertically, you have to set a fixed height for table rows. Select the relevant rows and, on the Table Tools Layout tab, click Properties. On the Row tab, select "Specify height" and then choose "Exactly" for "Row height is." Specify the desired amount.
To set the cell width and height, use the CSS style. The height and width attribute of the <td> cell isn't supported in HTML5. Use the CSS property width and height to set the width and height of the cell respectively.
Set the width to anything near zero, to shrink it, then set the white-space to nowrap. Solved.
td { width:0.1%; white-space: nowrap; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With