SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast antitoxic's Avatar
    Join Date
    Apr 2008
    Location
    London, UK
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Tab white-space width and preformatted text

    As in in W3C reccomendations
    Quote Originally Posted by W3C
    The horizontal tab character (decimal 9 in [ISO10646] and [ISO88591] ) is usually interpreted by visual user agents as the smallest non-zero number of spaces necessary to line characters up along tab stops that are every 8 characters. We strongly discourage using horizontal tabs in preformatted text since it is common practice, when editing, to set the tab-spacing to other values, leading to misaligned documents.
    Things that are unclear to me:
    • Every tab width equals 8 characters from current font ?
    • Or every tab width is defined by the upper line first 8 characters width (WWWWWW != llllllll in width if not monospace family)

    The important teaser for me : Is there any way to change tab size except wrapping all tabs in element (span most probably)

  2. #2
    SitePoint Enthusiast antitoxic's Avatar
    Join Date
    Apr 2008
    Location
    London, UK
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A bit of new observation:
    When font switched to sans-serif font, Firefox and safari apply smaller tabs. Opera and IE don't.

  3. #3
    Design Your Site Team bronze trophy Erik J's Avatar
    Join Date
    May 2007
    Location
    Countryside, Sweden
    Posts
    3,407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by antitoxic
    As in in W3C reccomendations

    Things that are unclear to me:
    • Every tab width equals 8 characters from current font ?
    • Or every tab width is defined by the upper line first 8 characters width (WWWWWW != llllllll in width if not monospace family)

    The important teaser for me : Is there any way to change tab size except wrapping all tabs in element (span most probably)
    1 - Yes.
    2 - It is the space character of current font and font-size.
    3 - From the top of my head; no.


    I think serifs usually adds to the character width, so maybe the font family is not the same.
    Happy ADD/ADHD with Asperger's

  4. #4
    SitePoint Enthusiast antitoxic's Avatar
    Join Date
    Apr 2008
    Location
    London, UK
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Font family seems to have no infuence in opera or IE again.
    Well seen elsewhere tab is exchanged with spaces but this is quite negative for the reader.

    I will stick with the defined width but it does seems like too much especially on large font size.

  5. #5
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is precisely why W3C strongly discourage using horizontal tabs in preformatted text .
    Birnam wood is come to Dunsinane


Tags for this Thread

Bookmarks

Posting Permissions

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