Let's take 4 table columns - ID
, Text
, Date
, Action
. In my case table have always constant width - in example 960px.
How can I create such table as :
*-*------------------------------------*----------*----*
|1| Some text... |May 2011 |Edit|
*-*------------------------------------*----------*----*
|2| Another text... |April 2011|Edit|
*-*------------------------------------*----------*----*
As we can see, ID
, Date
and Action
adjust their width to content, Text
is as long as possible....
Is that possible to do without setting specific width of columns ? When ID
= 123 or Date
= November 2011, columns should automatically be wider...
To adjust table row and column size in Word: Click anywhere in the table. 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."
Press E and the Height option opens. Enter your choices and press Enter. To change the column width, press Alt+O and then press C (for Column) and then W (for width). Type your values and press Enter.
Try this:
.id, .date, .action is the table cells (td).
CSS:
.id, .date, .action {
width: 1em;
}
It worked for me.
The width:1em will not cut the text but force the width size to the minimum.
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