#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2004
    Posts
    19
    Rep Power
    0

    css (or something else) trick i'm looking for ...


    i'm wonderring if there's a way to add elipses ('...') to a long div that isn't suposed to wrap, contained by a table with a relative width. in other words, if somone resizes the browser window so that the div can show all of it's text, then fine, but if it's resized in such a way to clip any of the text, then the elipses are added.

    not sure if this can be done, but i'm wonderring if anyone has seen it or done it. thanks for any feedback.

    zick
  2. #2
  3. No Profile Picture
    Self-banned
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Feb 2004
    Location
    http://middle.nowhere.com
    Posts
    2,288
    Rep Power
    3606
    Not sure if it's possible, but you would probably have to do it with javascript, finding the new window dimensions when someone resizes the page, and using it as a condition on how much of the line to print. Cant' really offer any more than that, but it's a start.
  4. #3
  5. No Profile Picture
    The Forest
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2002
    Posts
    321
    Rep Power
    13
    In theory, this would work (although it would, regardless of whether or not the full text is shown, add the elipses):

    Code:
    *[style*="overflow: hidden"]:after {
    content: "...";
    }
    Not sure how well that's supported (probably pretty poorly), though. The "overflow: hidden" property must be declared inline, unfortunately, for this to work.

    Hope that helps!

    Happy coding!
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2004
    Posts
    19
    Rep Power
    0
    i was looking more for css, than js ...
    i was hoping there was a option or style attrib that worked.
    but i'll try that css one. thanks.

IMN logo majestic logo threadwatch logo seochat tools logo