Display: block not showing in IE (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


DWS -> Display: block not showing in IE (3/9/2007 17:04:37)

Apparently after three years a client of mine called to say that the menues on their site stopped working. It was created and tested for Firefox. Well, they dont work in IE and Im getting a bit frustrated.

So, I created some simple tests. Apparently IE cant do a LOT of things.
This displays on every browser that I have except IE. Yes I know its not pretty but its just some quick and dirty testing.

Is there ANY way to get around this issue with IE not showing things on hover?

<html>
	<head>
		<style type="text/css">
			.none	{ display: none;}
			#active:hover li { display: block; }
			#active li { display: none; }
			
			ul { list-style-type: none;}
		</style>
	</head>
	<body>
		<h1>This is a H1</h1>
		<h1 class="none">You shouldnt see this one.</h1>
		<p>You can see this.</p>
		<ul id="display">
			<li id="active">
				<a href="#">And...</a>
					<ul id="another">
						<li id="alsoactive">you should now see this!</li>					
					</ul>
			</li>
		</ul>
	</body>
</html>




DWS -> RE: Display: block not showing in IE (3/9/2007 21:37:44)

I found a link in the forms for this site:
http://www.xs4all.nl/~peterned/csshover.html

for the css hover effect - which would work for what Im doing. Except one thing. I cant get it to work. I can get it to work on Their site but if I copy the code to my computer it doesnt work.




jurgen -> RE: Display: block not showing in IE (3/9/2007 22:44:04)

It works for me with FF, NS8 and IE7.......

Only after I took out the DOC declaration it didn't work with IE. Make sure you have a DOC type specified in your page and it should be fine.




Tailslide -> RE: Display: block not showing in IE (3/10/2007 3:38:04)

The hover:whatever that you've downloaded should do the trick for IE6 < (IE6 is pretty stupid - it only applies hover effects to links). I've used it on several sites.

Can you show us how you've linked to the hover file?

I've linked it like this on my site (in the document head):

<!--[if lt IE 7]>
<style type="text/css">
body {behavior: url(scripts/csshover.htc);}
</style>
<![endif]--> 

Which will add the hover rule to the body on IE versions prior to IE7 which has finally fixed the issue.





DWS -> RE: Display: block not showing in IE (3/10/2007 9:01:53)

I call it same as you did:

<style type="text/css">
body {behavior: url(scripts/csshover.htc);}
</style>





DWS -> RE: Display: block not showing in IE (3/10/2007 9:06:48)

jurgen!

It works now. The freakin doctype. I didnt put it in because I was just testing. Well, there you go. Something that simple caused me ALL those hours of frustration.

Thanks guys!




jurgen -> RE: Display: block not showing in IE (3/10/2007 9:17:53)

Yup, sometimes you look for all kinds of things and the obvious doesn't come to mind. Great you have it working.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.09375