Nested Outlines <dl>?

Discussion in 'HTML' started by paul, Jan 2, 2005.

  1. paul

    paul Guest

    Is there another tag to use for indented outlines like categorized lists
    in several categories?

    Here's a description of <dl> usage:
    http://www.maxdesign.com.au/presentation/definition/

    example:

    Links
    Home Pages
    aol.com
    -crappy home page you don't want
    google.com
    -recommended home page
    Tutorials
    blah.com/learn
    -good concise explanations

    It would be nice if I bothered to add al this extra code if it added
    <h1> <h2> etc for me.
    paul, Jan 2, 2005
    #1
    1. Advertising

  2. paul

    Neal Guest

    On Sun, 02 Jan 2005 11:51:17 -0800, paul <> wrote:

    > Is there another tag to use for indented outlines like categorized lists
    > in several categories?
    >
    > Here's a description of <dl> usage:
    > http://www.maxdesign.com.au/presentation/definition/
    >
    > example:
    >
    > Links
    > Home Pages
    > aol.com
    > -crappy home page you don't want
    > google.com
    > -recommended home page
    > Tutorials
    > blah.com/learn
    > -good concise explanations
    >
    > It would be nice if I bothered to add al this extra code if it added
    > <h1> <h2> etc for me.


    1) Reserve dl for actual lists of terms and definitions. Some of this
    could be, not all of it.

    2) Here I'd use nested lists.

    <h2>Links</h2>
    <ul>
    <li>Home Pages
    <dl>
    <dt>aol.com</dt>
    <dd>-crappy home page you don't want</dd>
    <dt>google.com</dt>
    <dd>-recommended home page</dd>
    </dl>
    </li>
    <li>Tutorials
    <dl>
    <dt>blah.com/learn</dt>
    <dd>-good concise explanations</dd>
    </dl>
    </li>
    </ul>
    Neal, Jan 2, 2005
    #2
    1. Advertising

  3. paul

    paul Guest

    Neal wrote:

    > On Sun, 02 Jan 2005 11:51:17 -0800, paul <> wrote:
    >
    >> Is there another tag to use for indented outlines like categorized
    >> lists in several categories?
    >>
    >> Here's a description of <dl> usage:
    >> http://www.maxdesign.com.au/presentation/definition/
    >>
    >> example:
    >>
    >> Links
    >> Home Pages
    >> aol.com
    >> -crappy home page you don't want
    >> google.com
    >> -recommended home page
    >> Tutorials
    >> blah.com/learn
    >> -good concise explanations
    >>
    >> It would be nice if I bothered to add al this extra code if it added
    >> <h1> <h2> etc for me.

    >
    >
    > 1) Reserve dl for actual lists of terms and definitions. Some of this
    > could be, not all of it.
    >
    > 2) Here I'd use nested lists.
    >
    > <h2>Links</h2>
    > <ul>
    > <li>Home Pages
    > <dl>
    > <dt>aol.com</dt>
    > <dd>-crappy home page you don't want</dd>
    > <dt>google.com</dt>
    > <dd>-recommended home page</dd>
    > </dl>
    > </li>
    > <li>Tutorials
    > <dl>
    > <dt>blah.com/learn</dt>
    > <dd>-good concise explanations</dd>
    > </dl>
    > </li>
    > </ul>



    OK thanks, that makes sense.

    Is it OK to move the list title above like this to get another level of
    indenting:

    <ul>Home Pages
    <li>
    <dl>
    <dt>aol.com</dt>
    <dd>-crappy home page you don't want</dd>

    (otherwise I need a negative left margin in CSS)
    paul, Jan 2, 2005
    #3
  4. paul

    Neal Guest

    On Sun, 02 Jan 2005 12:34:44 -0800, paul <> wrote:

    > Is it OK to move the list title above like this to get another level of
    > indenting:
    >
    > <ul>Home Pages
    > <li>
    > <dl>
    > <dt>aol.com</dt>
    > <dd>-crappy home page you don't want</dd>
    >
    > (otherwise I need a negative left margin in CSS)


    Sure. Remember, you can use about any markup in the list containers. So
    you can use <h2> or whatever within the listitem. Just remember, nest the
    new list within a list item, not within the <ul>.
    Neal, Jan 2, 2005
    #4
  5. On Sun, 02 Jan 2005 12:34:44 -0800, paul <> wrote:

    [snip]

    > Is it OK to move the list title above like this to get another level of
    > indenting:
    >
    > <ul>Home Pages


    No, it isn't. List elements may only contain list items.

    [snip]

    Mike

    --
    Michael Winter
    Replace ".invalid" with ".uk" to reply by e-mail.
    Michael Winter, Jan 2, 2005
    #5
  6. paul

    paul Guest

    Michael Winter wrote:

    > On Sun, 02 Jan 2005 12:34:44 -0800, paul <> wrote:
    >
    > [snip]
    >
    >> Is it OK to move the list title above like this to get another level
    >> of indenting:
    >>
    >> <ul>Home Pages

    >
    >
    > No, it isn't. List elements may only contain list items.
    >
    > [snip]
    >
    > Mike



    But I can't indent as I like without doing that. Here's the page I'm
    talking about:
    http://www.edgehill.net/1/?SC=go.php&DIR=Misc/photography
    paul, Jan 2, 2005
    #6
  7. paul

    Steve Pugh Guest

    paul <> wrote:
    >Michael Winter wrote:
    >> On Sun, 02 Jan 2005 12:34:44 -0800, paul <> wrote:
    >>
    >>> Is it OK to move the list title above like this to get another level
    >>> of indenting:
    >>>
    >>> <ul>Home Pages

    >>
    >> No, it isn't. List elements may only contain list items.

    >
    >But I can't indent as I like without doing that. Here's the page I'm
    >talking about:
    >http://www.edgehill.net/1/?SC=go.php&DIR=Misc/photography


    Then change your stylesheet so that it indents as you want it to.

    Steve
    Steve Pugh, Jan 2, 2005
    #7
  8. paul

    Neal Guest

    On Sun, 02 Jan 2005 15:36:10 -0500, Neal <> wrote:

    > On Sun, 02 Jan 2005 12:34:44 -0800, paul <> wrote:
    >
    >> Is it OK to move the list title above like this to get another level of
    >> indenting:
    >>
    >> <ul>Home Pages
    >> <li>
    >> <dl>
    >> <dt>aol.com</dt>
    >> <dd>-crappy home page you don't want</dd>
    >>
    >> (otherwise I need a negative left margin in CSS)

    >
    > Sure. Remember, you can use about any markup in the list containers. So
    > you can use <h2> or whatever within the listitem. Just remember, nest
    > the new list within a list item, not within the <ul>.


    Right, and I missed the illegal text in ul. ul ol and dl can only contain
    their listitems. The listitems, however, can contain nearly anything you
    like.
    Neal, Jan 2, 2005
    #8
  9. On Sun, 02 Jan 2005 13:53:41 -0800, paul <> wrote:

    >> On Sun, 02 Jan 2005 12:34:44 -0800, paul <> wrote:


    [snip]

    >>> <ul>Home Pages


    [snip]

    > But I can't indent as I like without doing that.


    Of course you can - place the text before the list.

    A few other comments:

    1) You shouldn't skip heading levels just because you don't like the
    size.
    2) "[move up one folder]" isn't a header.
    3) FONT elements aren't defined in the Strict DTD.
    4) You have two BODY start tags.

    Mike

    --
    Michael Winter
    Replace ".invalid" with ".uk" to reply by e-mail.
    Michael Winter, Jan 2, 2005
    #9
  10. paul

    paul Guest

    Steve Pugh wrote:

    > paul <> wrote:
    >
    >>But I can't indent as I like without doing that. Here's the page I'm
    >>talking about:
    >>http://www.edgehill.net/1/?SC=go.php&DIR=Misc/photography

    >
    >
    > Then change your stylesheet so that it indents as you want it to.



    I couldn't make this work without a negative margin:
    <ul>
    <li>Home Pages

    ul {margin: 0 0 0 -2em;}



    This seemed to work fine:
    <ul>Home Pages
    <li>
    <dl>

    It just seemed odd to do a negative margin like that but maybe it's OK?
    paul, Jan 2, 2005
    #10
  11. paul

    Steve Pugh Guest

    paul <> wrote:
    >Steve Pugh wrote:
    >> paul <> wrote:
    >>
    >>>But I can't indent as I like without doing that. Here's the page I'm
    >>>talking about:
    >>>http://www.edgehill.net/1/?SC=go.php&DIR=Misc/photography

    >>
    >>
    >> Then change your stylesheet so that it indents as you want it to.

    >
    >I couldn't make this work without a negative margin:
    > <ul>
    > <li>Home Pages
    >
    >ul {margin: 0 0 0 -2em;}


    You need to set both margin-left and padding-left on both ul and li in
    order to have a chance of over riding the defaults in all modern
    browsers.

    >This seemed to work fine:
    > <ul>Home Pages
    > <li>
    > <dl>


    It's wrong.

    Steve
    Steve Pugh, Jan 2, 2005
    #11
  12. paul

    paul Guest

    Steve Pugh wrote:

    > paul <> wrote:
    >>
    >>I couldn't make this work without a negative margin:
    >> <ul>
    >> <li>Home Pages
    >>
    >>ul {margin: 0 0 0 -2em;}

    >
    >
    > You need to set both margin-left and padding-left on both ul and li in
    > order to have a chance of over riding the defaults in all modern
    > browsers.


    I had the padding set to zero also without joy. Is it OK to use a
    negative margin? That seems to be what's needed. I took out the bullet
    but it still reserved the space for it.
    paul, Jan 2, 2005
    #12
  13. paul

    Neal Guest

    On Sun, 02 Jan 2005 14:50:28 -0800, paul <> wrote:

    > Is it OK to use a negative margin?


    Of course it is.
    Neal, Jan 2, 2005
    #13
  14. paul

    paul Guest

    Michael Winter wrote:

    > On Sun, 02 Jan 2005 13:53:41 -0800, paul <> wrote:
    >
    >
    >> But I can't indent as I like without doing that.

    >
    >
    > Of course you can - place the text before the list.



    Well strictly speaking I'd lose the meaning of it being the list title.


    >
    > A few other comments:



    Ah, you guys are so mean! <g>


    >
    > 1) You shouldn't skip heading levels just because you don't like the
    > size.


    I know, just a matter or re-doing a bunch of stuff to correct. Better
    sooner than later I guess as it multiply's over time.


    > 2) "[move up one folder]" isn't a header.


    Waaaa! <g>


    > 3) FONT elements aren't defined in the Strict DTD.


    OK fair enough.


    > 4) You have two BODY start tags.


    Yeah I'd have to rewrite the whole PHP templating system to avoid that &
    it seems to work fine. It's just a silly javascript thing (my only one)
    & I didn't want it running on the other pages. Other than goofing up
    validation checks I wonder if there is any real danger in some of these
    things. Anyways I didn't do that casually, it'd be a big chore to fix.
    paul, Jan 2, 2005
    #14
  15. On Sun, 02 Jan 2005 15:02:13 -0800, paul <> wrote:

    > Michael Winter wrote:


    [snip]

    >> [...] place the text before the list.

    >
    > Well strictly speaking I'd lose the meaning of it being the list title.


    Really? I don't think so.

    [snip]

    Mike

    --
    Michael Winter
    Replace ".invalid" with ".uk" to reply by e-mail.
    Michael Winter, Jan 2, 2005
    #15
  16. paul

    paul Guest

    Neal wrote:

    > On Sun, 02 Jan 2005 14:50:28 -0800, paul <> wrote:
    >
    >> Is it OK to use a negative margin?

    >
    >
    > Of course it is.



    OK thanks for the clarification. I have done that for all definition
    lists with CSS now. Whew, it really is important to figure this stuff
    out early. For example I've got <h2>'s all over because when I started,
    I didn't know <h1> could be downsized.
    paul, Jan 3, 2005
    #16
  17. paul

    Neal Guest

    On Sun, 02 Jan 2005 17:37:04 -0800, paul <> wrote:

    > OK thanks for the clarification. I have done that for all definition
    > lists with CSS now. Whew, it really is important to figure this stuff
    > out early. For example I've got <h2>'s all over because when I started,
    > I didn't know <h1> could be downsized.


    We learn something new every day!

    Check it in a few different browsers, rendering of lists really varies.
    Neal, Jan 3, 2005
    #17
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Leif K-Brooks

    What's the story with CSS outlines?

    Leif K-Brooks, Nov 27, 2003, in forum: HTML
    Replies:
    9
    Views:
    367
    Marco Bakker
    Nov 28, 2003
  2. dorayme
    Replies:
    8
    Views:
    391
    dorayme
    Feb 13, 2007
  3. Manmeet Mittal

    Help for designing outlines in c language

    Manmeet Mittal, Jul 17, 2006, in forum: C Programming
    Replies:
    11
    Views:
    518
    Herbert Rosenau
    Jul 18, 2006
  4. swiftset
    Replies:
    2
    Views:
    406
    Mike C. Fletcher
    Mar 22, 2007
  5. Peter Wilson

    PDF Outlines / Bookmarks (im lost)

    Peter Wilson, Jul 16, 2003, in forum: Perl Misc
    Replies:
    0
    Views:
    245
    Peter Wilson
    Jul 16, 2003
Loading...

Share This Page