How to make the overflow CSS property work with hidden as value

后端 未结 6 1247
南方客
南方客 2020-11-30 22:21

I am having a tough time with overflow: hidden.

Basically, I am trying to hide the overflow of an unordered list which is located in a

6条回答
  •  盖世英雄少女心
    2020-11-30 22:41

    This worked for me

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi.

    Adding position:absolute to the parent container made it work.

    PS: This is for anyone looking for a solution to dynamically truncating text.

    EDIT: This was meant to be an answer for this question but since they are related and it could help someone on this question I shall also leave it here instead of deleting it.

提交回复
热议问题