max-width:-webkit-fit-content ie 8 equivalent?

前端 未结 4 520
感动是毒
感动是毒 2021-02-08 18:59

Are there any hacks for max-width:-webkit-fit-content; for ie 8?

Trying to get a child div to not take up the whole width of the parent and this works well

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-08 19:47

    From demosthenes.info, I learned I can simply use

    display: table;
    

    instead of

    width: fit-content;
    

    Check the link however about problems with whitespaces. It does not apply to my case, and simply replacing width: fit-content with display: table solved my problem quite easily.

提交回复
热议问题