Cut off long URL's in comments? (7 posts)

  1. JPigford
    Posted 10 years ago #

    I noticed there here on the boards, long URL's get cut off instead of break the layout...just wondering how to do that in the comments section of my site.

    Like this:

  2. Cypher
    Posted 10 years ago #

    This might help.

    thread .post {
    overflow: hidden;
    width: 100%;


  3. JPigford
    Posted 10 years ago #

    Doh, I don't know why I didn't think of that...

  4. tsguitar
    Posted 10 years ago #

    This doesn't work with IE, though...

  5. Kafkaesqui

    Posted 10 years ago #

    "This doesn't work with IE, though..."

    A lot of things don't. Try playing with the width value, that is set it to something less than 100%, or provide an exact pixel width.

  6. tsguitar
    Posted 10 years ago #

    True. I'm just letting folk know that the overflow: hidden doesn't work in IE. A lot of things don't work in IE, but a lot of our visitors use IE and we have to keep that browser in mind. Setting the width value didn't get me what I wanted, so I just removed the "/"s from any URLs so that the line could break somewhere convenient. I'm using a recent comments plug in:

    I changed:
    $words = split(" ",$comment_content);

    $words = split("[ /]",$comment_content);

    So now it's looking for a space or for "/" to count as the character between words. This has its drawbacks and I'd do better to install a proper plug in. It's on my list of things to-do (research, research, research for the right plug in!); this fix worked for now.

  7. Kafkaesqui

    Posted 10 years ago #

    If you don't mind a hacky plugin solution (hacky in the sense I've never been happy with it, but it works for the most part)...


Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.