HTML table colgroup element not working?

后端 未结 7 2137
无人及你
无人及你 2021-01-03 18:25

I want different styles on each column of a table. I\'ve read that you could do that by using or , but I had no luck. I

7条回答
  •  心在旅途
    2021-01-03 18:55

    That's correct. While colgroup itself is supported by all browsers, this isn't true for the attributes of the inner col element. Of possible attributes, only width is supported on all browsers. But unlike CSS, only supports pixel and percentage widths.

    Don't use it. Instead, create CSS classes and assign them to each td. Yes, it sucks.

    EDIT Updated link above to page with better information

提交回复
热议问题