Blank line after a definition list (DL)?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Timur Tabi

    Blank line after a definition list (DL)?

    Is there a way I can have the browser automatically insert a blank
    line after each definition in a definition list? Right now I have
    this:

    term-1
    definition text ....
    term -2
    definition text ...

    I'd like to have this:

    term-1
    definition text ....

    term -2
    definition text ...


    But I want to do it without manually putting a blank line after each
    "definition text".
  • Michael Fesser

    #2
    Re: Blank line after a definition list (DL)?

    ..oO(Timur Tabi)
    >Is there a way I can have the browser automatically insert a blank
    >line after each definition in a definition list?
    Sure. Use CSS to adjust the bottom margin of the 'dd' elements:

    dd {margin-bottom: 1em}

    Micha

    Comment

    • Ben C

      #3
      Re: Blank line after a definition list (DL)?

      On 2008-03-02, Timur Tabi <timur@tabi.org wrote:
      Is there a way I can have the browser automatically insert a blank
      line after each definition in a definition list? Right now I have
      this:
      >
      term-1
      definition text ....
      term -2
      definition text ...
      >
      I'd like to have this:
      >
      term-1
      definition text ....
      >
      term -2
      definition text ...
      >
      >
      But I want to do it without manually putting a blank line after each
      "definition text".
      dl { margin-bottom: 2.24em }

      Comment

      • Ben C

        #4
        Re: Blank line after a definition list (DL)?

        On 2008-03-02, Michael Fesser <netizen@gmx.de wrote:
        .oO(Timur Tabi)
        >
        >>Is there a way I can have the browser automatically insert a blank
        >>line after each definition in a definition list?
        >
        Sure. Use CSS to adjust the bottom margin of the 'dd' elements:
        >
        dd {margin-bottom: 1em}
        Oops, yes that's what I meant when I just said to put a margin-bottom on
        the dl.

        You could use margin-bottom: 1.12em since that's normally what's used in
        browser default stylesheets to approximate the height of one line. It
        doesn't make much difference though.

        Comment

        • David E. Ross

          #5
          Re: Blank line after a definition list (DL)?

          On 3/2/2008 12:44 PM, Timur Tabi wrote:
          Is there a way I can have the browser automatically insert a blank
          line after each definition in a definition list? Right now I have
          this:
          >
          term-1
          definition text ....
          term -2
          definition text ...
          >
          I'd like to have this:
          >
          term-1
          definition text ....
          >
          term -2
          definition text ...
          >
          >
          But I want to do it without manually putting a blank line after each
          "definition text".
          I prefer to specify margins at the top, not only for Web pages but also
          when using Word.

          <style TYPE="text/css">
          dt { margin-top: 1em }
          dd { margin-top: 0.5em }
          </style>

          This puts a one-em blank line before the defined term (the dt) and only
          a half-em line between the defined term and the definition itself (dd).

          --
          David Ross
          <http://www.rossde.com/>

          Have you been using Netscape and now feel abandoned by AOL?
          Then use SeaMonkey. Go to <http://www.seamonkey-project.org/>.

          Comment

          • Jukka K. Korpela

            #6
            Re: Blank line after a definition list (DL)?

            Scripsit Ben C:
            You could use margin-bottom: 1.12em since that's normally what's used
            in browser default stylesheets to approximate the height of one line.
            It doesn't make much difference though.
            And you don't need to make guesses on the line height, because you can
            set it (it's healthy anyway; the specific value should depend on the
            font characteristics ):

            * { line-height: 1.12; }
            dd { margin-bottom: 1.12em; }

            A full blank line might be a little too much, though.

            Anyway, this is purely a CSS matter. It would not make sense to try to
            force empty vertical spacing using HTML markup, especially since it's so
            simple in CSS.

            --
            Jukka K. Korpela ("Yucca")


            Comment

            • Eric B. Bednarz

              #7
              Re: Blank line after a definition list (DL)?

              "Jukka K. Korpela" <jkorpela@cs.tu t.fiwrites:
              And you don't need to make guesses on the line height, because you can
              set it (it's healthy anyway; the specific value should depend on the
              font characteristics ):
              The specific value should depend on several factors, language not the
              least of them (erm, I know that you know that, but you don’t say that
              above, and normal people never consider that ;-).
              A full blank line might be a little too much, though.
              I wonder why the idea of a baseline grid is so alien to web
              typography. But I don't even know if I disagree. :-)

              --
              “Rapidiously develop corporate value rather than installed base process
              improvements. Collaboratively unleash process-centric synergy with
              interoperable best practices.”
              <http://www.apple.com/downloads/dashboard/developer/corporateipsum. html>

              Comment

              Working...