cedwa wrote:
I am developing a site at http://www.nwlmi.org.uk
The problem lies with the CSS/XHTML Menu which relies on JavaScript to
open and close the sections. The parent sections open and close fine
but when you click on one of the subsection items and go to the desired
page the menu fails to remain open.
The javascript code is embeded inthe html for reference.
Is this a JS issue I wonder. The original script/code derived from
Alsacreations but there is no documentation to aid this problem.
I do not see your script problem off hand; perhaps someone else will
find it. However, on your page, you state: "This site is valid XHTML
and CSS" near the bottom of the page. The code is written as xhtml 1.0
strict, and the code does validate at W3C. However, if you valadate at
the W3C using the extended version, you find that the content type
being served is text/html, not the correct one for xhtml which is
xhtml+xml or xml. The reason for this is that you are using the
extension .html which nearly all servers associalte with ordinary html.
To server xhtml, you have to define a mime type for xhtml at the server
and associate it with an extension such as .xhtml or .xml. Then you
will find you are serving xhtml. However you will also find that the
page will not work on IE6, because IE6 can not handle true xhtml. To
overcome this problem you either have to provide both html and xhtml
pages, or play with the header exchange, often using a php include, to
automatically rewrite the page as html when the header exchange
indicates that the browser will not support xhtml+xml. As now served,
your page would be much better written as html 4.01 strict. Your css
validates at the W3C, but there are many warnings listed concerning it.
The warning only means that certain css code you use might not produce
a desired effect in some cases and that you need to examine the code to
be certain that this is not the case. In other words, just because
something is correct from a code viewpoint, does not mean that it
always will have the effect that you had in mind.