David Loring

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromDavid Loring
ToMe
SubjectCSS Menus working in IE7 but not Opera/Firefox/Chrome
Date5 January 2010 16:16
A good day to you and many thanks for your site.

I have been trying to convert a static menu to a CSS menu using the code on
the site, but I seem to be having a problem.

Amazingly the menu functions correctly in IE7, but in Chrome, Firefox 3.5
and Opera 10 the menus just appear in a single complete column.

I am scratching my head!!

You can see the menu at [URL] and I
have zipped the files and put a download link.

Your assistance would be greatly appreciated. (I am trying to get my head
round this CSS/HTML stuff but I am a VB.NET programmer - we all have our
cross to bear!)

Many thanks
David Loring
FromMe
ToDavid Loring
SubjectRe: CSS Menus working in IE7 but not Opera/Firefox/Chrome
Date10 January 2010 19:43
David,

> Amazingly the menu functions correctly in IE7, but in Chrome, Firefox 3.5
> and Opera 10 the menus just appear in a single complete column.

I have mentioned this in a previous email:
http://www.howtocreate.co.uk/emails/MichaelBrandon.html
However, it's easy to miss that email, so I'll do a full reply here to make
it easier to find:

IE 7- has a bug; it does not understand </li> tags, and ignores them
completely. Your list is invalid; it has the </li> tags in the wrong places,
or to be more accurate, it has the nested <ul> tags in the wrong places -
they are supposed to be *inside* their parent LI, not after the </li> tags.

INVALID:
<ul>
  <li>foo</li>
  <ul>
    <li>bar</li>
  </ul>
</ul>

VALID:
<ul>
  <li>foo
    <ul>
      <li>bar</li>
    </ul>
  </li>
</ul>

This is a requirement of the HTML specification (UL elements may only
contain LI elements as direct children).


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
FromDavid Loring
ToMe
SubjectRe: CSS Menus working in IE7 but not Opera/Firefox/Chrome
Date10 January 2010 20:59
Thanks for that. I will give it a whirl.

Best regards
David
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.