On Tue, 3 Apr 2007, David Hucklesby wrote: > On Wed, 4 Apr 2007 01:46:33 +0000 (UTC), John Wells wrote: >> Guys, >> >> Is there a way to wrap data in table cells, even though there is no >> whitespace in that >> data to break? >> >> In other words, if I have string like so: >> >> http://abiglongurlwithnospacetobreakin.com >> >> I'd like to have it wrap when the browser is shrunk so that the screen >> doesn't have to >> scroll. Wrap could be on any arbitrary letter, like so: >> >> http://abiglongurlwithno >> spacetobreakin.com >> > ~~~~~~~~~~~~~~~~~~~~~~~~ > > Hi John, > I don't know if this works in table cells, as I have little experience > with tables. But if this is only happening in IE, I suggest trying the > IE special declaration: word-wrap:break-word;
I don't think the problem is IE-specific, since other browsers are a little _less_ inclined into breaking strings with no whitespace. The word-wrap property is in the CSS 3 Text draft, so in that sense it is not really "IE special" (in the same sense as some other properties that are not on the CSS standardization track at all). On IE, it works in table cells too, if an explicit width has been set for a cell. But it is ignored by other browsers. Besides, breaking at an arbitrary character isn't suitable for URLs in general. There are specific recommendations (e.g., in the Chicago Manual of Style) where a URL should be broken when needed. The practical way to do so is to add <wbr> tags at the allowable break points; of course, this is a non-CSS and nonstandard approach, but it's the only one that really works. More info on this: http://www.cs.tut.fi/~jkorpela/html/nobr.html#suggest URLs are generally problematic in document content, since they tend to be non-breakable strings, or browsers may break them at unacceptable points like after a hyphen. If possible, URLs should appear in attribute values only, as in href="..." in a link. If URLs are really needed in document content, using a small font size, together with a font family that is reasonable readable at a small size, might help, e.g. <span class="url"><http://www.example.com/<wbr>blabla/<wbr>bla><span> with .url { font-size: 75%; font-family: Verdana, sans-serif; } -- Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/ ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7 information -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/