You are here: Re: Formatting string to start new line « All PHP « IT news, forums, messages
Re: Formatting string to start new line

Posted by Stefan Rybacki on 09/30/13 11:39

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

chris schrieb:
> I am displaying various lists of names from a database such as;
>
> Mr C Smith, Mrs A Bell etc.
>
> If the list is longer than the width of the page I end up with;
>
> Mr C Smith, Mrs A Bell, Mr J
> Black
>
> How can I bring Mr J Black unto a new line automatically. I've included
> the code I am using below.
>

Are we talking about HTML output?
If yes use in your CSS definition:

nobreak {
white-space: nowrap;
}


and surround your names with <nobreak>name here</nobreak>

Regards
Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)

iD8DBQFD6yiNyeCLzp/JKjARApYVAJ96Iwv+Eo1XuWyb1wzbnHhrIm/FDACeKXCi
J4/8o0y7oYmzskTM2IyxIN0=
=uXDU
-----END PGP SIGNATURE-----

 

Navigation:

[Reply to this 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

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