Width ignored on flexbox items

后端 未结 8 1566
有刺的猬
有刺的猬 2021-01-30 02:42

http://jsfiddle.net/XW9Se/

I\'ve set width: 200px; on the left

but if I view it with the browser inspector tool it appears that the
相关标签:
8条回答
  • 2021-01-30 03:41

    The answer from Adrift is perfect; but a change to make it more flex would be

    #left{
        flex-basis: 200px;
        flex-grow: 0;
        flex-shrink: 0;
    }
    

    And remove the width property entirely.

    It would be the flex way to say that the element will have an invariable width of 200px

    0 讨论(0)
  • 2021-01-30 03:43

    Also (if nothing from above works)

    Check your min-width and max-width. It fixed the same problem for me by increasing their range.

    0 讨论(0)
提交回复
热议问题