0

I have this review box seen in image below. It is a div. I set the width and height on the box, and I have float element to the right.

Now the text is overflowing the box, I want it to show ellipsis instead of overflowing. I tried overflow:hidden on the box and it didn't work.

double-beep
  • 5,031
  • 17
  • 33
  • 41
Noitidart
  • 35,443
  • 37
  • 154
  • 323
  • 2
    can you post your code? – G.L.P Jul 18 '14 at 07:47
  • Instead of floating the left side element use `display:table` for box and used `table-cell` for inner items. and then for text part use `text-overflow:ellipsis`. – Kheema Pandey Jul 18 '14 at 07:49
  • Thanks for replies everyone. This project of mine went on s two week hold. I'll be getting back to it this week so will research these answers. So @janaspage I'm not sure of answer as I didn't read these replies yet but the answer may be in this topic. If not, if u find out anything plaza do share – Noitidart Jul 28 '14 at 20:13

1 Answers1

3

you can't use text-overflow: ellipsis for multiline text, you can achieve it purely with CSS like shown in this page: CSS Ellipsis, though it will be harder to do it than using a jQuery plugin.

the easier way is to use a jQuery plugin, like mentioned by Jim Thomas here

Community
  • 1
  • 1
Kyojimaru
  • 2,694
  • 1
  • 14
  • 22