tags:

views:

49

answers:

2

Is it possible to use markup like this

<ul>
   <li><a href="#"><img alt="" src="/image1.jpg"></a></li>
   <li><a href="#"><img alt="" src="/image2.jpg"></a></li>
</ul>

And do a sliding door effect? I have some CSS that looks like this:

ul li {
    list-style-type: none;
    margin:0; padding:0;
}
li a { 
    display:block;
    overflow:hidden;
    width:225px;
}
li a img {
    float:left;
}
li a:hover img {
    float:right;
}

It works in FireFox but IE7 doesn't seem to understand the float:left / float:right code. Any ideas?

A: 

Have a look at these articles on A List Apart and see if they do what you need:

They have a lot of other good articles if you can't sleep like me...

AnonJr
+1  A: 

Have you tried setting the <li> to block?

ul li { display: block; }

If I recall correctly, IE had issues with lists, unless you explicitly defined the styles.

As an aside: Sliding Doors is a term that has a different meaning to what you describe - might even throw some people off =)

K Prime
Does what I'm describing have a title? I'd like to name this post correctly if possible.
Devin
Hi K Prime, I tried this out and it doesn't seem to work in IE. Thanks for the prompt response though!
Devin