Standard Compliant Alternative to WBR Tag
The WBR tag marks a place where a line break can take place. It does not necessarily always result in a line break; rather, it says that line breaks are allowed at this place.but it is not part of any HTML standard.
A possible solution is to insert a space, that is very small, and (almost) invisible. On IE/PC and Safari you can't see it at all, and on Opera and Mozilla you realy need good eyes to see any space (but there is one)
The solution is to insert a space surrounded by a span tag, that is styled with width:0; and font-size: 1px;
We need to use 1px for the font-size, because some browsers (sfarai) will ignore a font-size set to 0.
Example:
someverylongword<span style="width:0;font-size:1px;font-size:0px;"> </span>thatcouldbreakyourlayout
Test:somevery longwordthatgoesonandonand thatcouldbreakyourlayout
UPDATE:
There is also another alternative: ­ and ​
quirksmode.org wbr compatibility test
quirksmode.org article
matthias - 20. Jun, 15:05
1 comment - add comment - 0 trackbacks






