Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    May 2005
    Location
    Leeds, UK
    Posts
    83
    Thanks
    1
    Thanked 0 Times in 0 Posts

    wrapping with  

    Just had a look in IE7 and FF1.5 and it seems to me that using   as whitespace (eg "I've got a lovely bunch of coconuts") does not result in the text wrapping to the size of its container. To get a wrap you have to use an actual space ("I've got a lovely bunch of coconuts"). Is this right? I thought for a minute I was going mad

  • #2
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
      = non-breaking space

  • #3
    New Coder
    Join Date
    May 2005
    Location
    Leeds, UK
    Posts
    83
    Thanks
    1
    Thanked 0 Times in 0 Posts
    heh. Any chance we could delete this thread to save me looking sheepish
    Hadn't really thought that through. Always just accepted   as necessary substitution for space, for compliance.
    Looking at w3c specs on whitespace:
    This specification does not indicate the behavior, rendering or otherwise, of space characters other than those explicitly identified here as white space characters. For this reason, authors should use appropriate elements and styles to achieve visual formatting effects that involve white space, rather than space characters.
    I find this a little unclear. Is it saying we should avoid using space characters in all cases? or, by 'visual formatting' does it mean things like an extra long gap between words?
    For w3c compliance should normal (breaking) spaces be substituted with an ascii space (   )? Of course you can get by in most cases with a space character, but while we're on the subject...

  • #4
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    Quote Originally Posted by W3C
    authors should use appropriate elements and styles to achieve visual formatting effects that involve white space, rather than space characters.
    I'd interpret that spec statement as to mean 'special' visual formatting such as keeping the two parts of a person's name together (in the event that it's felt important to do so).

    e.g.
    Code:
    John Doe
    The spaces between words in normally flowing text can use yer common or garden space (space bar) character.
    Afaik, a space character is interpretted appropriately by all known UAs. (Any UA which demanded the use of the ascii char code instead of a basic space character would fall out of favour pretty quickly due to the number of pages it failed to render correctly.)

    Character encoding does much of the donkey work.

  • #5
    New Coder
    Join Date
    May 2005
    Location
    Leeds, UK
    Posts
    83
    Thanks
    1
    Thanked 0 Times in 0 Posts
    ok. thanks for clearing that up for me.

  • #6
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    browsers will often (always?) remove multiple spaces between words, so if you do want increased spacing then   can be used then.
    My thoughts on some things: http://codemeetsmusic.com
    And my scrapbook of cool things: http://gjones.tumblr.com

  • #7
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    Quote Originally Posted by GJay View Post
    browsers will often (always?) remove multiple spaces between words, so if you do want increased spacing then   can be used then.

    I think it's likely to be always. I believe that it's part of the spec that regular spaces are 'non-cumulative', whereas   are cumulative.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •