Kenny

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromKenny
ToMe
Subjecthelp with CSS/DHTML menu (behavior file)
Date3 August 2005 15:03
Hi, first of all, I'm very new to websites, coding etc. so it might sound as
if I'm talking rubbish - trying not to.
I found your CSS/DHTML menu tutorial which I found very helpful. I got it
working in Firefox no problem, but I can't seem to get the behavior part to
work so that it will work in IE. I know I'm probably doing something wrong,
but I just can't figure it out. I already have some js on my main HTML page,
wondering if there is a clash or something. I know nothing about DHTML
behaviors. Could you give me some guidance. If you need me to, I'll email
some code. But even if you've got any ideas or guidance, I'll try it out.

Thanks,

Kenny.
FromKenny
ToMe
SubjectCSS/DHTML menu,Can't get .htc file to work.
Date3 August 2005 15:03
Hi,
Sorry for contacting you again, but I'm really struggling to get the .htc
behavior file to work for the fly out menu in IE. I've tried everything that
I know and have come to the end of ideas.
I've put this at the bottom of my CSS style sheet. (I've also tried it in
the Head of my HTML)

<!--[if gte IE 5]>
<style type="text/css">
ul.linklist li ul {behavior:url(IEmen2.htc);}
ul.linklist ul ul {display: none; position:absolute; top: 2px; left: 200px; }
</style>
<![endif]-->

I know that this is slightly different to what you displayed on your site:

<!--[if gte IE 5]>
<style type="text/css">
ul.linklist li { behavior: url( IEmen.htc );}
ul.linklist ul {display: none; position: absolute; top: 2px; left: 78px;}
</style>
<![endif]-->

But if I put this, my menu doesn't show up at all. The way I have it above
shows the main menu in IE without the submenu. The menu works perfectly in
Firefox (of course)
I've also had the menu show with a static submenu also displayed in IE.

I can't figure this out, and I don't know javascript at all to be able to go
any further.

Please can you help???

Kenneth.
FromMe
ToKenny
SubjectRe: help with CSS/DHTML menu (behavior file)
Date4 August 2005 23:50
Kenny,

> I know nothing about DHTML behaviors. Could you give me some guidance. If
> you need me to, I'll email some code. But even if you've got any ideas or
> guidance, I'll try it out.

It should just work. Please do not email me the code, give me the URL of a
web page where I can see it failing. I will take a look and see if I can
work out why it fails for you.

Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
FromKenny
ToMe
SubjectRe: help with CSS/DHTML menu (behavior file)
Date5 August 2005 17:43
Tarquin,

Unfortunately,  my code is all local on my PC. If you want I'll Zip it all
and send you the winzip file of the code?

Kenny.
FromMe
ToKenny
SubjectRe: help with CSS/DHTML menu (behavior file)
Date5 August 2005 21:05
Kenny,

> Unfortunately,  my code is all local on my PC. If you want I'll Zip it all
> and send you the winzip file of the code?

yeah, you can try - although this is always a lot more easy if I can see
these pages for real online. never mind, send the zip, and I will serve it
myself on my test server

Tarquin
FromKenny
ToMe
SubjectRe: help with CSS/DHTML menu (behavior file)
Date5 August 2005 21:33
Attachmenttest files
Well here goes. Thanks for looking. You've got everything here.

Kenny
FromMe
ToKenny
SubjectRe: help with CSS/DHTML menu (behavior file)
Date6 August 2005 00:39
Attachmentfixed .htc file
Kenny,

right, I see what your problem is. You have put the conditional comment
section inside the CSS file. It does not belong in there. It belongs inside
the HTML file.

See the source of
http://www.howtocreate.co.uk/tutorials/testMenu.html

You also have several mistakes in your htc file
* The element names are upper case in HTML (lower case in XHTML)
* You used "for{" instead of "for("
* the last long line ends with "." instead of "; }"

I have attached a fixed version of the HTC file - you will need to remove
the conditional comment stuff from the CSS file, and put it in the HTML file
(before the </head> tag).

Tarquin
FromKenny
ToMe
SubjectRe: help with CSS/DHTML menu (behavior file)
Date6 August 2005 16:02
Tarquin,

Your a genius!! Thanks for the help, got it working now. I really appreciate
it. When the site is finished, I'll link to your site and put all the
appropriate comments and credits. Thanks. Hope it didn't take up too much of
your time.

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