Results 1 to 7 of 7

Thread: Letting and Kerning (Changing Linespacing and Space in btw letters in a word, sentenc

  1. #1
    Join Date
    Jun 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Letting and Kerning (Changing Linespacing and Space in btw letters in a word, sentenc

    How do I do change the space btw letters, words, and sentences on CSS? How do I change the space in btw the lines in CSS?

    Thank you

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    letter-spacing:10%;
    word-spacing:20%;
    line-height:150%;

    Sentence spacing is not available as far as I know, per se. You can add   to pad the spacing or use a span with padding:

    span.sentence {
    padding:0 1em;
    }

    or to make coding easier you could hijack the <b> tag:

    b {
    font-weight:normal;
    padding:0 1em;
    }

    and enclose each sentence in <b></b> tags.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1
    Sentence spacing is not available as far as I know
    No, it isn't. It's not available in word processors, either.

    span.sentence {
    padding:0 1em;
    }
    But never do that...

    b {
    font-weight:normal;
    padding:0 1em;
    }
    ...and never that.

    If you really must space out sentences (and I can't, for the life of me, think why), then just use non-breaking spaces. Stuffing elements, particularly inappropriate ones, into a document is just horrible.

    Mike

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Mike
    If you really must space out sentences (and I can't, for the life of me, think why), then just use non-breaking spaces. Stuffing elements, particularly inappropriate ones, into a document is just horrible.
    Like fingernails across a chalkboard? It does work and lends more precision than '&nbsp;'. I've never used it for sentence spacing though and probably wouldn't but, it is ideal for rendering graphic content using fixed width font text in tables, ex:

    http://home.comcast.net/~ansiguy/images/new/zonker.htm

    Broke alot of rules with that one.

    Note: Having arrived at the above page out of context, turn off javascript if you want to use the 'back' button.
    Last edited by jscheuer1; 06-09-2005 at 05:15 PM.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1
    Like fingernails across a chalkboard?
    Something like that.

    It does work and lends more precision than '&nbsp;'.
    I'm not disputing whether it works, but how suitable it is. The resulting markup would be bloated, non-semantic, awkward to maintain, and just...icky.

    http://home.comcast.net/~ansiguy/images/new/zonker.htm

    Broke alot of rules with that one.
    Good grief! You're telling me.

    Code:
    <BASE HREF=http://home.comcast.net/~ansiguy/images/new/>
    Unquoted attribute value. This happens in numerous places, namely most href, style, and a couple of intrinsic event attributes.

    Code:
    </HEAD>
    The head element is closed twice, and the first occasion is too early.

    Code:
    font-family: Courier New, monospace;
    Font families that contain spaces should be quoted (but they don't always need to be).

    Code:
    alignment:left;
    There is no alignment property.

    Code:
    id=A
    Duplicate id attribute values. This is everywhere.

    Code:
    <u id=FA>
    The u element must have a closing tag. None of them do.

    I think those are all of the classes of error. I haven't run the page through a validator, so I might have missed some. I'd hate to think how many errors it comes to in total: hundreds, at least.

    Mike

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Ah but, the page looks nice in many browsers. I hadn't noticed about the two closing head tags and the alignment:left, those are unintentional breaches of protocol. At the time I didn't know about quoting spaced font families but, if I had and saw it worked without it, I probably wouldn't have bothered. Unquoted attributes? When every byte counts, you've got to be kidding me. The rest is just getting over on the browser, I know it isn't correct. I got a good laugh out of your reply, hope you did too.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1
    Unquoted attributes? When every byte counts, you've got to be kidding me.
    Not all of them are that important, but whenever slashes (especially) appear, you should quote (and they are for the most part).

    I got a good laugh out of your reply, hope you did too.
    Of course! I was sure you were expecting a response, and I didn't want to disappoint.

    Mike

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
  •