You are here: Re: How to render a heading as two lines? « HTML « IT news, forums, messages
Re: How to render a heading as two lines?

Posted by Jim Moe on 03/22/06 09:32

Greg N. wrote:
> Suppose you need a heading <h1>Huddersfield Canal Society</h1> to be
> rendered as two lines. The result you want to see is:
>
> Huddersfield
> Canal Society
>
> It can be fudged by marking it up as
> <h1>Huddersfield<br>Canal Society</h1>
>
Not a "fudge" at all. <br>s are commonly abused to create
inter-paragraph space where <p> or padding/margin styles are more
appropriate. In this case, though, no problem.
Also
<h1><p>Huddersfield</p><p>Canal Society</p></h1>

Is it the two line appearance you actually want? The <br> is best for that.
Or are you just avoiding some messy text wrapping as the viewport width
narrows? Then you could put a &nbsp; in between Canal and Society. That
whole line of text would wrap as a unit.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)

 

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

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