Template talk:NowraplinksDavid testing nowraplinks
This template stops word wraps inside links (links with blanks in) and only allows word wraps between the links and in normal text. This is useful for instance for long link lists. It works similar to {{nowrap}}, but the method here gives much shorter and easier to use code. I have implemented this as {{nowraplinks}} and {{nowraplinks end}}.
This functionality could also be included in templates such as {{Navbox}}. The reason I use the The actual code that does the job is this CSS code:
and this code:
The class "nowraplinks" that I use to stop word wrapping in the middle of the links is now declared in common.css so everyone can use it. To view the source code of the examples below simply click the edit button on this page, not on the Espionage boxes. But click the "show" button on the Espionage boxes to see the link lists. Example with {{nowraplinks}}Old {{nowrap}} causing lots of codeOld normal wrapping
Usage in tablesFor tables the best option is to directly use the Nice, isn't it? I hope people like it. If any one know a better way to do this please tell. I have tested that this works well in IE 5.5, Opera 9.02 and Firefox 2.0. --David Göthberg 17:27, 10 August 2007 (UTC) Span vs. divHave you tested using <div> instead of <span>? I'm not entirely sure, but it may correct some of the problems you've been having with more complicated wrapping cases. --Dinoguy1000 Talk 15:01, 22 August 2007 (UTC)
Floating over the border problemI have noticed that the really bad "floating over the right border problem in Firefox and Internet Explorer" occurs when link lists contain any of:
So that is the situations when we need to use {{nowrap begin}} + {{·wrap}} + {{nowrap end}} since it solves that problem. This only happens when a link list uses {{nowraplinks}} or its CSS class. But we use that CSS class in {{navbox}} thus this happens a lot. Note that not using {{nowraplinks}} would mean having to use {{nowrap begin}} + {{·wrap}} + {{nowrap end}} on all link lists which would be more work and more code. --David Göthberg (talk) 06:32, 26 February 2008 (UTC)
Well, we who know about the problem fix it on sight. So I don't know of any existing examples out there although I stumble on them pretty often. But here are some hand coded examples. For Firefox the problem usually is that the text and links will flow over the right border of the box. For Internet Explorer the main problem is that it will do line breaks at the parenthesis or quotation marks even if there are no spaces next to those parenthesis or quotation marks. Note! To see the problem you might have to drag the width of your web browser window so it becomes smaller and smaller. 1: Here is an example using the nowraplinks class:
2: And here is the same example still surrounded by the nowraplinks class but now using the fix {{nowrap begin}} + {{·wrap}} + {{nowrap end}}. As far as we know this example should behave well in all web browsers and not flow out of the box and only line break after the dots.
Remember, this might look different in different versions of Firefox and Internet Explorer. Not all users use the latest web browser version. --David Göthberg (talk) 10:49, 26 February 2008 (UTC)
Nowrap how-to guideI first rough version of Wikipedia:Line break handling is done. Its a how-to guide about how to handle word wraps (line breaks) at Wikipedia. Take a look and discuss it on its talk page. --David Göthberg (talk) 21:38, 11 March 2008 (UTC) Nowraplinks question for Template:Catholic PrayersIn {{Catholic Prayers}}, the
|