From: "Curby"
Hi, I'm looking for a good way to display long URLs in full. The
page
has an elastic, somewhat fluid width, so the URL should take up as
much of the available width as possible before wrapping. Of course,
the URL may disrupt the layout if it didn't wrap at all. I can use
server-side scripting to massage the URL, e.g. insert some sort of
breakpoint every x chars.
The question: how can this be handled in the final HTML/CSS? It
would
be nice if the breaks didn't appear unless required. While HTML
allows for "insert a line break" and "insert a space that doesn't
break," it doesn't seem to be able to do something like "don't break
between these two chars unless you really need to." I know about
soft-hyphens, but I believe their support, esp. with Gecko browsers,
is spotty.
Have there been any hacks to replace soft hyphen functionality or
otherwise define hidden breakpoints in words? Am I overlooking some
easy alternative solution? Or will I just have to live with literal
spaces rendered on screen? Thanks!
Standards-based solutions are, infortunately, not very efficient or
widely supported. If, however, you want to alleviate the issue in MSIE
Windows, you can use a proprietary property delivered via Conditional
Comment or Expression:
<!--[if lte IE 7]>
<style>
#yourelement {word-wrap:break-word;}
</style>
<![endif]-->
Expression (can go inside ordinary style sheet):
#yourelement {
word-wrap:expression("break-word");
}
--
Al Sparber
PVII
http://www.projectseven.com
"Designing with CSS is sometimes like barreling down a crumbling
mountain road at 90 miles per hour secure in the knowledge that
repairs are scheduled for next Tuesday".
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************