20
Jun
2005

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: &shy; and &#8203;

quirksmode.org wbr compatibility test
quirksmode.org article

Woohoo! the BMW-Oracle-Sailing Team is Blogging

Woohoo! the BMW-Oracle-Sailing Team is Blogging at twoday.net!

Tom Ehman is the main editor and it seems that he and his team is doing a great job at their new blog.
logo

Mat's Blog

California Dreaming

Users Status

You are not logged in.

Search

 

Weather

Aktuelles Wetter in Kitzbuhel:


Temperatur: -12 C
UV Index: N/A
Luftfeuchte: 86 %
Sichtweite: Unlimited km
Luftdruck: 939.4 mb
Windstärke: calm 

Weather data provided by weather.com

Get Firefox

Get Firefox!

Currently Reading


William Gibson, Jarreth Merz, Matthias Scherwenikas
Neuromancer, 3 Audio-CDs

Archive

June 2005
Sun
Mon
Tue
Wed
Thu
Fri
Sat
 
 
 
 1 
 2 
 4 
 5 
 6 
 7 
 8 
 9 
10
11
12
13
14
15
16
17
18
19
21
22
24
25
26
27
28
29
30
 
 
 

Recent Updates

but yammer accepts
no Austrian mobile numbers :(
cqeb - 15. Dec, 23:45
das verpasse ich leider......
das verpasse ich leider... http://twitter.com/flog/st atus/998712029
flog - 10. Nov, 21:38
bin schon sehr gespannt!...
bin schon sehr gespannt! bis dann
barbarao - 10. Nov, 15:59
hab mich auch gerade...
hab mich auch gerade angemeldet ;)
barbarao - 26. Aug, 10:57
minute 33 is auch sehr...
minute 33 is auch sehr interessant.
MasterOfDesaster - 7. Jul, 16:00
ja der Vortrag ist sehr...
ja der Vortrag ist sehr nett und zum testen kann man...
niepi - 4. Jul, 13:14
BTW: TrimJunction isn't...
BTW: TrimJunction isn't the Rhino port of Rails which...
robert42 - 27. Jun, 16:59
danke :)
danke :)
matthias - 5. Jun, 08:41

Status

Online for 1545 days
Last update: 15. Dec, 23:45

Credits

Knallgrau New Media Solutions - Web Agentur für neue Medien

powered by Antville powered by Helma


Creative Commons License

xml version of this page

twoday.net AGB