List problems...

E

e n | c k m a

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.
 
W

wizard

e n | c k m a said:
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?
 
E

e n | c k m a

<!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.
 
M

Mark Parnell

e said:
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.
 
E

e n | c k m a

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.
 
J

Jukka K. Korpela

e n | c k m a said:
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.
 
E

e n | c k m a

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.
 
J

Jukka K. Korpela

e n | c k m a said:
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).
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top