Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Html Tags > Re: HELP - Extr...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 389 of 447
Post > Topic >>

Re: HELP - Extra Space Tag

by "Jukka K. Korpela" <jkorpela@[EMAIL PROTECTED] > Jan 8, 2006 at 11:43 AM

Gazza <news@[EMAIL PROTECTED]
> wrote:

> In answer to your problem, use the non-breaking space character entity 
> &nbsp;

It's really just an entity reference that evaluates to a character
reference, 
denoting a character. You could just as well use the no-break space
itself, 
if you know the basics of character encoding issues on the Web (sadly
enough, 
most authors don't).

On the other hand, by HTML specifications, the effect of using the
no-break 
space, in rendering and otherwise, is _undefined_. Most browsers treat it
as 
a non-collapsible non-shrinkable space character, but you have been
warned.

Besides, you didn't say _how_ to use it. Using "- - foo. &nbsp;Bar - -"
would (usually) cause a space to appear at the start of a line if a
browser 
happens to insert a line break after the ".". Making both spaces non-
breaking, "- - foo.&nbsp;&nbsp;Bar - -" would prevent a line break between

sentences, and this would not be good typography.

So "- - foo.&nbsp; Bar - -" would probably be the most sensible way of
using 
a no-break space.

The _logical_ approach would be to make each sentence an element,
<span class="s">Here is a sentence.</span>, and use CSS to add some right
padding to each sentence, like
..s { padding-right: 0.5em; }

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
 




 2 Posts in Topic:
Re: HELP - Extra Space Tag
Gazza <news@[EMAIL PRO  2006-01-07 19:57:40 
Re: HELP - Extra Space Tag
"Jukka K. Korpela&qu  2006-01-08 11:43:39 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Oct 16 0:26:56 CDT 2008.