Jump to content

IE6 Issue

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
OK, guys.

Welcome to Stav Cinemas

See that "Book Ticket" button? Right, roll over it with the mouse. It should turn red and the text should enlarge. Like from this:

Posted Image

... into this:

Posted Image

The code I use to make the transition is this:


#badge

{

	margin: 0 auto;

	width: 128px;

	height: 128px;

	background: url('book.gif') no-repeat 50% 0%;

	text-align: center;

}

#badge:hover

{

	background-image: url('book2.gif');

}


You can probably guess that "badge" is the ID of the div that contains the image.

The HTML is simple:

<div id="badge"><a href="?page=book"><img src="badgelink.gif" style="height: 128px; width: 128px;border:none;" alt="Book a Ticket" /></a></div>

The only thing is - nothing happens in IE6. Any ideas why?
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#2
Guest_Jordan_*

Guest_Jordan_*
  • Guests
IE6 doesn't "hover" well. You'll need some JavaScript or just forget about developing for IE6 (people should really upgrade). Here is a link: sides of march - An IE6-compatible solution for :hover

#3
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Ditching IE6 isn't really an option, because our school uses it and it's a school project. It never occured to me that the CSS hover was the problem, as I've used a:hover before without any problems. Thanks for the link, I'll try it.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#4
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Update: Jordan, your solution uses the Prototype JS Framework. Is it really worth an extra 40Kb worth of library just for this? Got anything... smaller?
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#5
Guest_Jordan_*

Guest_Jordan_*
  • Guests
The problem is that IE6 doesn't support hover on anything but links, I believe. Here is a smaller one that should work: Sons of Suckerfish | HTML Dog

#6
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Great, I'll try it. And yes, I just found out now that it's only anchors that IE6 supports with pseudo-classes.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums