Forum Moderators: not2easy
Have downloaded and implemented csshover.htc (version 2.02.060206) but it's not working for me. All I want to do is show a hidden UL (not even a multi-tiered menu).
I've studied many of of the discussions here involving csshover.htc - especially the posts by SuzyUK - and it looks like I'm doing everything right, but maybe my specificity is off or something. Could someone please take a look and sight my error?
****************************************
Here's the snippet from my css:
body{
behavior: url("csshover.htc");
}
/*Hide UL element "logged_in_menu" by default*/
div#panel_container div.panel ul.logged_in_menu {
display: none;
}
/*Show UL element "logged_in_menu" when hover is over it's enclosing .panel DIV*/
div#panel_container div.panel:hover ul.logged_in_menu {
border-top: 1px solid black;
padding-top: 10px;
display: block;
}
****************************************
Here's the html snippet:
<div id="panel_container"><!-- Start Panel Container Div (Floats Left) -->
<div class="panel nav"><!-- Start Panel User Logged In Div -->
<div class="catBkgrnd">
<h3 class="catHead iconMenuArrow">User Logged In</h3>
</div>
<p class="specifics">You are currently logged in as ’Danni30’ (Danny Ash)</p>
<ul class="logged_in_menu">
<li class="iconDocuEdit"><a href="#">Edit Careers Profile</a></li>
<li class="iconDocuEdit"><a href="#">Edit Forum Profile</a></li>
<li class="iconDocuEdit"><a href="#">Edit General Profile</a></li>
<li class="iconDocuEdit"><a href="#">Edit Shop Profile</a></li>
<li class="iconLogOut"><a href="#">Logout</a></li>
</ul>
</div><!-- End Panel User Logged In Div -->
</div><!-- End Panel Container Div -->
****************************************
This works perfectly in all non IE browsers; but design spec also demans IE compliance as well of course. That's why I'm sweating so over this.
Really appreciate anyone who can target where I'm going wrong.
Neophyte
I used your code and worked great on every browser.
Try redownloading the file... from here:
[google.ro...]
P.S. Double-check the file is in the same folder as the CSS.
Cheers,
Mihai
Thanks for your response. Yes, I am using the correct file, and when I was initially trying this, the .htc was in the same directory as my .css file. Strange.
BUT, I found a work around - I placed the following IE Conditional Comment in the head of my html file...
<!--[if IE]>
<style type="text/css">
body {behavior: url(a/htc/csshover.htc);}
</style>
<![endif]-->
...and now it works perfectly. Strange huh?
As you can see in the above, I decided to move the .htc file to it's own directory, but even when I had it in my css directory it still worked as long as I had the conditional comment in the head.
Not as practical as just having it in the style sheet (now I've got to include the CC in every html page) but atleast I've got it to work. Absolutly no luck when I include it in my css.
I had the same problem months and months ago when I was trying to use a .htc file to fix .png transparency in IE. I finally gave up in favor of a javascript that did the same thing.
I wonder if anyone else has had this problem of trying to draw in an .htc via a style sheet?
Neophyte