Reply to Re: Wrap long URL in table

Your name:

Reply:


Posted by Brian Cryer on 09/22/06 11:02

"Jukka K. Korpela" <jkorpela@cs.tut.fi> wrote in message
news:%FDQg.17342$8M5.10225@reader1.news.jippii.net...
> Jim Moe wrote:
>
>> Do not use the URL as the displayed text.
>
> Agreed.
>
>> Or you can add arbitrary spaces to the URL every nth character but
>> then the URL text cannot be copied/pasted.
>
> No, that's a wrong approach. If you _really_ must put URLs as text on a
> web page, throw in some <wbr> tags after suitable characters, such as "?",
> "/", and "&". See
> http://www.cs.tut.fi/~jkorpela/html/nobr.html#suggest

The <wbr> tag is great, widely supported but isn't in the w3c spec, so if
you use it then your page won't validate. I know this because I used to make
frequent use <wbr> until I got my fingers burnt over validation.

As an alternative, why not use the word-wrap css, for example:

<p style="width: 5em; word-wrap: break-word">12345678901234567890</p>

should render as two or more lines (depending on your font settings). Of
course to use this you have to know the maximum width you want - but the OP
knew his width.
--
Brian Cryer
www.cryer.co.uk/brian

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация