Min-width and max-height for table attributes

前端 未结 3 1144
遇见更好的自我
遇见更好的自我 2020-11-27 07:57

I have a table and I want to define the min-width and max-height properties. See example below.

My problem now is that the browser doesn\'t

3条回答
  •  执笔经年
    2020-11-27 08:33

    I don't see a problem with setting min-width for tables and cells. See this jsFiddle.

    HTML:

    test 1 test 2

    and CSS:

    table{width: 90%;}
    td#cell-one{min-width: 20%;}
    

    Remember, min-width is dependent on width (or max-width). max-width overrides width, and min-width overrides width or max-width. In other words, be sure to set the width property on the parent of the element you apply min-width to: jsFiddle

提交回复
热议问题