Issue with text overflow ellipsis

Why I dont see elllipsis and why is padding not applied to bottom of card?

.box {
  background-color: white;
  width: 1fr;
  box-shadow: 2px 4px 4px hsl(0deg 0% 0% / 0.38);
  border-radius: 8px;
  padding: 20px;
1 Like

The text-overflow property requires the white-space property set to nowrap
text-overflow - CSS: Cascading Style Sheets | MDN (
the three properties text-overflow white-space and overflow should be applied to the element that holds the text not its container
In your case, they should be applied to the p elements

when i do that - when I apply them all to p - what happens is - I have only first line of sentence showing. so it doesnt match whole visible div box but cuts immediately after first line of sentence , which is, of course, undesirable for me.

since this isn’t solved.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.