How to make sub-items of a list item?

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

    How to make sub-items of a list item?

    What I'm trying to do is something like this:
    1. . . . .
    2. . . . .
    3a . . . .
    3b . . . .
    3c. . . . .
    4. . . . .
    etc.

    Can you help me please?

    --
    _______________ _____________
    geotso's stories
    Be thou attentive!...

    (Please, remove the TRAP to contact me)


  • Brian

    #2
    Re: How to make sub-items of a list item?

    geotso wrote:[color=blue]
    > What I'm trying to do is something like this:
    > 1. . . . .
    > 2. . . . .
    > 3a . . . .
    > 3b . . . .
    > 3c. . . . .
    > 4. . . . .
    > etc.[/color]

    <ol>
    <li>
    <li>
    <li>
    <ol>
    <li>
    <li>
    <li>
    </ol>
    <li>
    <!-- etc. -->
    </ol>

    with styles to suggest numbering. That might be a good starting
    point. I don't know what the context is, so I can't offer more specifics.
    [color=blue]
    > Can you help me please?[/color]

    Well, start with the spec, and you can help yourself. :)


    --
    Brian
    follow the directions in my address to email me

    Comment

    • Lauri Raittila

      #3
      Re: How to make sub-items of a list item?

      In article geotso wrote:[color=blue]
      > What I'm trying to do is something like this:[/color]

      Since we are in stylesheet group, I assume you already know how to markup
      nested ordered list, and aim for exact look. (and if not, look source of
      example.)
      [color=blue]
      > 1. . . . .
      > 2. . . . .
      > 3a . . . .
      > 3b . . . .
      > 3c. . . . .
      > 4. . . . .
      > etc.[/color]

      Your example is inconsistant, I suppose "." in 3c is mistake? You need to
      use counters. Works only on Opera 5+, but is possible to make it degrade
      somewhat OK, I think.

      Example:

      (tested on Opera 7.21)

      References:



      It might be better hardcode numbering. If it is really meaningful.


      --
      Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
      Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
      tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.

      Comment

      • geotso

        #4
        Re: How to make sub-items of a list item?

        Brian,

        Thanks for your try, but I think it's not what I was asking for, and that's
        my fault:
        A common ordered list like the one you've posted, produces this result:

        1
        2
        3
        1
        2
        3
        4
        where the sub-items are indented under the item they belong.
        I want the sub-items in the same vertical-alinment and numbered with the
        same number, followed by a sub-count, like the one in my first post:
        1
        2
        3a
        3b
        3c
        4
        etc.

        Maybe you mean something by that "with styles to suggest numbering" that I
        don't get it. Could you explain it a bit please?

        Thanks again.

        Brian wrote:[color=blue]
        > geotso wrote:[color=green]
        >> What I'm trying to do is something like this:
        >> 1. . . . .
        >> 2. . . . .
        >> 3a . . . .
        >> 3b . . . .
        >> 3c. . . . .
        >> 4. . . . .
        >> etc.[/color]
        >
        > <ol>
        > <li>
        > <li>
        > <li>
        > <ol>
        > <li>
        > <li>
        > <li>
        > </ol>
        > <li>
        > <!-- etc. -->
        > </ol>
        >
        > with styles to suggest numbering. That might be a good starting
        > point. I don't know what the context is, so I can't offer more
        > specifics.
        >[color=green]
        >> Can you help me please?[/color]
        >
        > Well, start with the spec, and you can help yourself. :)
        > http://www.w3.org/TR/html401/struct/lists.html[/color]


        Comment

        • geotso

          #5
          Re: How to make sub-items of a list item?

          Lauri Raittila wrote:
          [color=blue]
          > Since we are in stylesheet group, I assume you already know how to
          > markup nested ordered list,[/color]

          you've guessed right!
          [color=blue]
          > Your example is inconsistant, I suppose "." in 3c is mistake?[/color]

          Not exactly! I used that ". . . . . " part, just as a text replacement and
          nothing more :)
          [color=blue]
          > You need to use counters. Works only on Opera 5+, but is possible to
          > make it degrade somewhat OK, I think.[/color]

          hmm. I don't like it, because I want it for a IE specific project.
          [color=blue]
          > It might be better hardcode numbering. If it is really meaningful.[/color]

          I think you've right again! I was looking for the easy way, but it doesn't
          matter!
          Thanks for your try!


          Comment

          • Evertjan.

            #6
            Re: How to make sub-items of a list item?

            geotso wrote on 30 okt 2003 in
            comp.infosystem s.www.authoring.stylesheets:
            [color=blue]
            > I think you've right again! I was looking for the easy way, but it
            > doesn't matter![/color]

            Experimenting, I diverted from the topic and made this:

            <script>var x=7</script>

            <ol type="a">
            <script>documen t.write("<li value="+ x-- +">")</script>qwerty
            <script>documen t.write("<li value="+ x-- +">")</script>qwerty
            <script>documen t.write("<li value="+ x-- +">")</script>qwerty
            <script>documen t.write("<li value="+ x-- +">")</script>qwerty
            <script>documen t.write("<li value="+ x-- +">")</script>qwerty
            <script>documen t.write("<li value="+ x-- +">")</script>qwerty
            <script>documen t.write("<li value="+ x-- +">")</script>qwerty
            </ol>


            --
            Evertjan.
            The Netherlands.
            (Please change the x'es to dots in my emailaddress)

            Comment

            • Jukka K. Korpela

              #7
              Re: How to make sub-items of a list item?

              Lauri Raittila <lauri@raittila .cjb.net> wrote:
              [color=blue]
              > It might be better hardcode numbering. If it is really meaningful.[/color]

              Yes, I'm afraid we need to wait for a few years before generated content and
              automatic numbering are well enough supported.

              Just to spell things out, hardcode numbering would best use simple
              <ul> lists, nested when needed, and containing the numbers in the <li>
              element contents. And CSS would be used just to suppress the default
              bullets.

              It's somewhat illogical to use <ul> when it's actually numbered, but the
              risk of getting bullets is more tolerable than the risk of getting extra
              numbers in front of the hardcode numbers (when CSS is disabled, or our
              list-style-type is overridden by a user style sheet).

              --
              Yucca, http://www.cs.tut.fi/~jkorpela/

              Comment

              • Johannes Koch

                #8
                Re: How to make sub-items of a list item?

                Evertjan. wrote:[color=blue]
                > <script>var x=7</script>
                >
                > <ol type="a">
                > <script>documen t.write("<li value="+ x-- +">")</script>qwerty
                > <script>documen t.write("<li value="+ x-- +">")</script>qwerty
                > <script>documen t.write("<li value="+ x-- +">")</script>qwerty
                > <script>documen t.write("<li value="+ x-- +">")</script>qwerty
                > <script>documen t.write("<li value="+ x-- +">")</script>qwerty
                > <script>documen t.write("<li value="+ x-- +">")</script>qwerty
                > <script>documen t.write("<li value="+ x-- +">")</script>qwerty
                > </ol>[/color]

                You know that this is invalid?
                --
                Johannes Koch
                In te domine speravi; non confundar in aeternum.
                (Te Deum, 4th cent.)

                Comment

                • Evertjan.

                  #9
                  Re: How to make sub-items of a list item?

                  Johannes Koch wrote on 31 okt 2003 in
                  comp.infosystem s.www.authoring.stylesheets:
                  [color=blue]
                  > Evertjan. wrote:[color=green]
                  >> <script>var x=7</script>
                  >>
                  >> <ol type="a">
                  >> <script>documen t.write("<li value="+ x-- +">")</script>qwerty
                  >> <script>documen t.write("<li value="+ x-- +">")</script>qwerty
                  >> <script>documen t.write("<li value="+ x-- +">")</script>qwerty
                  >> <script>documen t.write("<li value="+ x-- +">")</script>qwerty
                  >> <script>documen t.write("<li value="+ x-- +">")</script>qwerty
                  >> <script>documen t.write("<li value="+ x-- +">")</script>qwerty
                  >> <script>documen t.write("<li value="+ x-- +">")</script>qwerty
                  >> </ol>[/color]
                  >
                  > You know that this is invalid?[/color]

                  No

                  Depreciated yes.

                  Invalid, why?
                  What part is invalid, the qwerty?
                  Tested under IE6

                  --
                  Evertjan.
                  The Netherlands.
                  (Please change the x'es to dots in my emailaddress)

                  Comment

                  • Johannes Koch

                    #10
                    Re: How to make sub-items of a list item?

                    Evertjan. wrote:[color=blue]
                    > Johannes Koch wrote on 31 okt 2003 in
                    > comp.infosystem s.www.authoring.stylesheets:
                    >
                    >[color=green]
                    >>Evertjan. wrote:[/color][/color]
                    [invalid HTML code][color=blue][color=green]
                    >>You know that this is invalid?[/color]
                    >
                    >
                    > No
                    >
                    > Depreciated yes.
                    >
                    > Invalid, why?[/color]

                    E.g. ol elements cannot contains script elements.
                    [color=blue]
                    > What part is invalid, the qwerty?[/color]

                    You know how to validate HTML? Hint: <http://validator.w3.or g/>
                    [color=blue]
                    > Tested under IE6[/color]

                    You know that testing in WinIE with its Mega Bytes of error recovery
                    routines is not a good method to test for correctness of code?
                    --
                    Johannes Koch
                    In te domine speravi; non confundar in aeternum.
                    (Te Deum, 4th cent.)

                    Comment

                    • Evertjan.

                      #11
                      Re: How to make sub-items of a list item?

                      Johannes Koch wrote on 31 okt 2003 in
                      comp.infosystem s.www.authoring.stylesheets:[color=blue]
                      > E.g. ol elements cannot contains script elements.
                      >[color=green]
                      >> What part is invalid, the qwerty?[/color]
                      >
                      > You know how to validate HTML? Hint: <http://validator.w3.or g/>
                      >[/color]

                      Yes, if that is your definition of "invalid" then you are right.
                      [color=blue]
                      > E.g. ol elements cannot contains script elements.[/color]

                      Perhaps according to the spec., but a document.write should not harm, IMHO.
                      I could include the <ol> in the document.write.

                      My only point was that it is possible to have a decrementing <ol> sequence.

                      --
                      Evertjan.
                      The Netherlands.
                      (Please change the x'es to dots in my emailaddress)

                      Comment

                      • Eric Bohlman

                        #12
                        Re: How to make sub-items of a list item?

                        "Evertjan." <exjxw.hannivoo rt@interxnl.net > wrote in
                        news:Xns9425789 664B78eejj99@19 4.109.133.29:
                        [color=blue]
                        > Johannes Koch wrote on 31 okt 2003 in
                        > comp.infosystem s.www.authoring.stylesheets:[color=green]
                        >> E.g. ol elements cannot contains script elements.
                        >>[color=darkred]
                        >>> What part is invalid, the qwerty?[/color]
                        >>
                        >> You know how to validate HTML? Hint: <http://validator.w3.or g/>
                        >>[/color]
                        >
                        > Yes, if that is your definition of "invalid" then you are right.[/color]

                        When talking about HTML, "valid" and "invalid" are technical terms with
                        precise meanings. They're not subject to personal definitions. A valid
                        HTML document is one whose syntax conforms to the document type definition
                        (DTD) associated with its document type. An invalid HTML document is one
                        whose syntax doesn't conform. The question of whether or not the syntax
                        conforms is one that can be answered algorithmically , i.e. by a purely
                        mechanical process. Calling an HTML document "valid" or "invalid" is a
                        statement of fact, not a value judgment. People can hold differing
                        opinions on whether or not it's important for a document to be valid, but
                        not on whether or not a document *is* valid.

                        Comment

                        • Brian

                          #13
                          Re: How to make sub-items of a list item?

                          Evertjan. wrote:[color=blue]
                          >[color=green]
                          >>You know how to validate HTML? Hint: <http://validator.w3.or g/>[/color]
                          >
                          > Yes, if that is your definition of "invalid" then you are right.[/color]

                          May I ask why you put "invalid"[1] in quotes?



                          [1]Yes, I realize the irony, but in my case I'm quoting. :)

                          --
                          Brian
                          follow the directions in my address to email me

                          Comment

                          • Evertjan.

                            #14
                            Re: How to make sub-items of a list item?

                            Brian wrote on 31 okt 2003 in comp.infosystem s.www.authoring.stylesheets:
                            [color=blue]
                            > Evertjan. wrote:[color=green]
                            >>[color=darkred]
                            >>>You know how to validate HTML? Hint: <http://validator.w3.or g/>[/color]
                            >>
                            >> Yes, if that is your definition of "invalid" then you are right.[/color]
                            >
                            > May I ask why you put "invalid"[1] in quotes?[/color]

                            Yes, you may.
                            [color=blue]
                            > [1]Yes, I realize the irony, but in my case I'm quoting. :)[/color]

                            Same here.


                            --
                            Evertjan.
                            The Netherlands.
                            (Please change the x'es to dots in my emailaddress)

                            Comment

                            Working...