Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. div with display inline & span not working with text-overflow ellipsis

div with display inline & span not working with text-overflow ellipsis

Scheduled Pinned Locked Moved Web Development
htmlhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shefali_sinha
    wrote on last edited by
    #1

    sorry, some nested html messed up my last post about this. Heres my 2nd attempt to post this. ******************************* Hi, I have text like this: text that is very very very long and this text on same line to follow ellipsis It needs to be displayed in Intenet Explorer like this: text that is ... and this text on the same line to follow ellipsis. I have tried div and span tags, all give me the same problem, either the text has a line break after ellipsis, or the text does not break, but there are no ellipsis. What I've tried: 1.

    text that is very very long

    and this text on the same line to follow ellipsis 2.

    S 1 Reply Last reply
    0
    • S shefali_sinha

      sorry, some nested html messed up my last post about this. Heres my 2nd attempt to post this. ******************************* Hi, I have text like this: text that is very very very long and this text on same line to follow ellipsis It needs to be displayed in Intenet Explorer like this: text that is ... and this text on the same line to follow ellipsis. I have tried div and span tags, all give me the same problem, either the text has a line break after ellipsis, or the text does not break, but there are no ellipsis. What I've tried: 1.

      text that is very very long

      and this text on the same line to follow ellipsis 2.

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      shefali_sinha wrote:

      text that is very very longand this text on the same line to follow ellipsis

      Try:

      <span style="display:inline-block; width:30px; white-space:nowrap; text-overflow:ellipsis; overflow:hidden;">text that is very very long</span> and this text on the same line to follow ellipsis

      Note: this will only work in IE. Mozilla does not support either display:inline-block or text-overflow:ellipsis. Opera does support display:inline-block, but not text-overflow:ellipsis, so the first text will be cut off, but there will be no ellipsis between it and the second text.

      ---- I just want you to be happy; That's my only little wish...

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups