Domanda

According to w3.org the width attribute of col tags is obsolete. Their suggestion to "use css," however, doesn't work when you want to programatically change column widths.

Use case: User changes column widths. I save that layout in localstorage. User logs back in, I pull that layout from localstorage and....?

If I were the sort to ignore the standards I'd just go ahead and set the td or col width attribute. What should I do instead?

Note: as is usually the case with stack overflow, the act of writing the question revelaed the answer....I feel a bit dumb.

È stato utile?

Soluzione

Instead of using the width attribute, use a style attribute with a value for width.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top