PDA

View Full Version : csshover.htc stopped working because of .htacces changes


scarab5
09-10-2005, 01:12 AM
My site is using one php file to generate the entire site. The problem was it wasn't searchable both internally and by google/yahho because

http://www.temporarygate.com/index.php

wasn't being looked at as a separate file from

http://www.temporarygate.com/index.php?id=products

So I played around with my .htaccess file (had to leave yahoo to do so) and with a small php mod my site now looks like

http://70.86.13.2/~scarab5/index/products/looms/

One of the problems I had to overcome was getting all my images and links to css files to work again.

<base href="http://70.86.13.2/~scarab5/" >

fixed that problem and everything was working fine until I tried to look at it in IE...

********************************

The line I think that is causing problems is
<!--[if IE]>
<style type="text/css" media="screen">
body {behavior: url(csshover.htc); <--- this line
...
-->

That or inside the csshover.htc file

var currentSheet, doc = window.document, activators = {

For some reason the css is not getting reformatted for IE by the csshover.htc file.
Either behavior:url(csshover.htc) is not passing the intended file or csshover doesn't work with the way I am displaying the webpage. I really need my dropdown menu's to work cross platform.

I have also tried putting an absolute page link ex: behavior: url(http://localhost/csshover.htc); also put it inside quotes ex: url("csshover.htc").


If you need any more information please let me know.
Thx for taking the time to read it all your input is much appreciated.

P.S.
my .htaccess file is as follows
DefaultType application/x-httpd-php
DirectoryIndex index

SpirtOfGrandeur
09-10-2005, 01:35 AM
Here is the link you need. Your situation only stops working if you have IE 6.0 on WinXP SP2 because HTC files need to have a certain content.

Click Here (http://www.hoeben.net/node/83)

My ASP Code... Other guys PHP code :)

scarab5
09-10-2005, 02:25 AM
Wow that was a great help - no way I could have come up with that workaround. Something isn't getting done to my css by the csshover.htc file now though because it has a huge gap between each of the drop down items. Is there maybe a 1 line fix I could use to get it up and working?

http://70.86.13.2/~scarab5/

IE is the problem - looks fine in FireFox

also

http://www.temporarygate.com should still have what the dropdown menus looked like prior to the .htaccess changes

Thank you much for the quick reply!

scarab5
09-10-2005, 02:40 AM
http://www.hoeben.net/node/33#comment-56

I found that adding

AddType text/x-component .htc

to my .htaccess file had the same effect as changing the

behavior: url(csshover.htc);

to

behavior: url(htcmime.php?file=csshover.htc);

and using the php script on the page you linked above.

Either way csshover.htc is doing its thing now but is running into an error when it comes to the border/margin/padding at the bottom of the list...

Check out

http://70.86.13.2/~scarab5/

in IE to see what I mean...

SpirtOfGrandeur
09-10-2005, 05:55 AM
Yea the actual solution is the one you found. I just thought you had to have it that way for something... i miss read it...

scarab5
09-10-2005, 06:04 PM
I think I'm going to have to hard code whatever csshover.htc did for me because its not doing its job correctly still...wish I knew why it worked beatifully before and now its only doing half the job.

scarab5
09-10-2005, 06:31 PM
Well I was reading the Whatever:hover page

http://www.xs4all.nl/~peterned/csshover.html

to try and figure out how to do what he did when I come along a line

"The .htc file searches the stylesheet for :hover rules"

and notice that they are using the "#" notation not he "." notation. I had changed my menu.css file to all .'s I didn't realize that shouldn't be done. Also changed my <div id = "menu" to <div class = "menu" Soon as I switched those two things back its working great.

Still could not have done it without the help from your post above though

AddType text/x-component .htc

in my .htaccess file was the biggest thing I needed. Not messing with code I didn't fully understand is my secondary lesson :)

SpirtOfGrandeur
09-10-2005, 09:28 PM
Well I was reading the Whatever:hover page

http://www.xs4all.nl/~peterned/csshover.html

to try and figure out how to do what he did when I come along a line

"The .htc file searches the stylesheet for :hover rules"

and notice that they are using the "#" notation not he "." notation. I had changed my menu.css file to all .'s I didn't realize that shouldn't be done. Also changed my <div id = "menu" to <div class = "menu" Soon as I switched those two things back its working great.

Still could not have done it without the help from your post above though

AddType text/x-component .htc

in my .htaccess file was the biggest thing I needed. Not messing with code I didn't fully understand is my secondary lesson :)


I cannot get to it right now. Start a new thread with this question so that people will look at it. I am just about to leave to go out... I will try to get to it tomorrow!

mrruben5
09-11-2005, 12:30 AM
You know what you need to do with it? Throw it in a seperate dir, in wich a .htaccess is with RewriteEngine offNo rewriting on that dir :P