List problems...

Discussion in 'HTML' started by e n | c k m a, Sep 2, 2003.

  1. Hello,

    I'm currently working on a list [of bands/songs] and there's one problem I'm
    currently having that's really only evident in Lynx. You might say "well
    don't worry about it" but it's a problem that could be structural as well.
    I really don't understand what's wrong.

    The code I'm using is:

    <div style="float: left">
    <ul id="bandList">
    <li>Jimmy Eat World</li>
    <ul id="songList">
    <li>The Middle</li>
    </ul>
    <li>Fuel</li>
    <ul id="songList">
    <li>Shimmer</li>
    </ul>
    ....
    etc.

    The output in Lynx, however, is this:

    * Jimmy Eat World
    * The Middle

    Fuel
    * Shimmer

    So basically it treats the first list item as the list item below it...

    Hope that makes sense. All help greatly appreciated,

    Nick.
     
    e n | c k m a, Sep 2, 2003
    #1
    1. Advertising

  2. e n | c k m a

    wizard Guest

    e n | c k m a <> wrote:
    > Hello,
    >
    > I'm currently working on a list [of bands/songs] and there's one problem I'm
    > currently having that's really only evident in Lynx. You might say "well
    > don't worry about it" but it's a problem that could be structural as well.
    > I really don't understand what's wrong.
    >
    > The code I'm using is:
    >
    > <div style="float: left">
    > <ul id="bandList">
    > <li>Jimmy Eat World</li>
    > <ul id="songList">
    > <li>The Middle</li>
    > </ul>
    > <li>Fuel</li>
    > <ul id="songList">
    > <li>Shimmer</li>
    > </ul>
    > ...
    > etc.
    >
    > The output in Lynx, however, is this:
    >
    > * Jimmy Eat World
    > * The Middle
    >
    > Fuel
    > * Shimmer
    >


    <!ELEMENT UL - - (LI)+ -- unordered list -->
    <!ELEMENT LI - O (%flow;)* -- list item -->

    Got it?
    --
    wizard
     
    wizard, Sep 2, 2003
    #2
    1. Advertising

  3. >
    > <!ELEMENT UL - - (LI)+ -- unordered list -->
    > <!ELEMENT LI - O (%flow;)* -- list item -->
    >
    > Got it?
    >


    Yeah, thanks. Feel kinda stupid now...
    Ah well, only starting to use lists for structural reasons now so I'm still
    getting used to it.

    Thanks for your help,
    Nick.
     
    e n | c k m a, Sep 2, 2003
    #3
  4. e n | c k m a

    Mark Parnell Guest

    e n | c k m a wrote:
    > Hello,
    >


    G'day.

    > <div style="float: left">
    > <ul id="bandList">
    > <li>Jimmy Eat World</li>
    > <ul id="songList">
    > <li>The Middle</li>
    > </ul>
    > <li>Fuel</li>
    > <ul id="songList">
    > <li>Shimmer</li>
    > </ul>
    > ...
    > etc.
    >


    The above is not quite correct - should be

    <li>Jimmy Eat World
    <ul id="songList">
    <li>The Middle</li>
    </ul></li>
    etc.

    --

    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Sep 2, 2003
    #4
  5. Had fun removing all the </li>'s because the W3C Recommendation told me it
    was optional.

    But XHTML 1.0 Strict doesn't like omitting tags... So I had to put them in
    again.

    Nick.
     
    e n | c k m a, Sep 2, 2003
    #5
  6. "e n | c k m a" <> wrote:

    > Had fun removing all the </li>'s because the W3C Recommendation told
    > me it was optional.


    Well, "optional" means 'optional'. It means that by the specification, the
    meaning of a document is not changed by the presence or absence of those
    tags - assuming that they would be used at syntactically correct places.

    > But XHTML 1.0 Strict doesn't like omitting tags... So I had to put
    > them in again.


    The question is who likes XHTML 1.0 Strict. Besides, all variants of
    XHTML 1.0 disallow end tag omission.

    But the real problem was _where_ you had put those tags. I hope they are
    now at right places. This is one of situations where a validator can be
    useful - for checking that you have understood and applied the syntax
    right.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
     
    Jukka K. Korpela, Sep 2, 2003
    #6
  7. >
    > The question is who likes XHTML 1.0 Strict. Besides, all variants of
    > XHTML 1.0 disallow end tag omission.
    >


    Well I've started writing my pages in XHTML 1.0 Strict... I don't really
    have a problem with it. Although technically, you could save a lot of kb's
    without those end tags.

    What's a good standard to be using then? XHTML or HTML?

    >
    > But the real problem was _where_ you had put those tags. I hope they are
    > now at right places. This is one of situations where a validator can be
    > useful - for checking that you have understood and applied the syntax
    > right.
    >


    Yeah it's all good now, thanks.
     
    e n | c k m a, Sep 2, 2003
    #7
  8. "e n | c k m a" <> wrote:

    > Well I've started writing my pages in XHTML 1.0 Strict... I don't
    > really have a problem with it.


    Fine. But so many people started with something else, and now they fight
    with a bastard, a hybrid of HTML and XHTML.

    > Although technically, you could save a
    > lot of kb's without those end tags.


    Well, the end tags are probably worth their price, since they help to
    avoid some browser bugs. But as you noted, you also need to be better
    aware of the structure of the document, so that you put them into right
    places. This, in turn, is useful in the long run at least.

    > What's a good standard to be using then? XHTML or HTML?


    The important thing is to make a choice and not confuse the two (within a
    single document).

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
     
    Jukka K. Korpela, Sep 2, 2003
    #8
    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. Replies:
    3
    Views:
    963
    Natty Gur
    Nov 3, 2003
  2. roopa
    Replies:
    6
    Views:
    790
    Jerry Coffin
    Aug 27, 2004
  3. dackz
    Replies:
    0
    Views:
    504
    dackz
    Feb 6, 2007
  4. Debajit Adhikary
    Replies:
    17
    Views:
    720
    Debajit Adhikary
    Oct 18, 2007
  5. OW Ghim Siong
    Replies:
    2
    Views:
    422
    Peter Otten
    Nov 30, 2010
Loading...

Share This Page