kiswa
07-08-2007, 08:34 PM
Okay, this code works fine in both FF2 and IE7. However, in IE6, it will only display the random background for the first option. I don't get it.
#sidebar {
width: 250px;
height: 250px;
position: absolute;
right: 0;
top: 183px;
}
#sidebar.rand1 { background: url(../imgs/rand1.gif) left top no-repeat; }
#sidebar.rand2 { background: url(../imgs/rand2.gif) left top no-repeat; }
#sidebar.rand3 { background: url(../imgs/rand3.gif) left top no-repeat; }
#sidebar.rand4 { background: url(../imgs/rand4.gif) left top no-repeat; }
#sidebar.rand5 { background: url(../imgs/rand5.gif) left top no-repeat; }
The HTML looks like this:
<div id="sidebar" class="rand2">
<h3 class="rnd3"><a href="http://kiswa.com/work" title="View my work">My Work</a></h3>
<p><a href="http://kiswa.com/work" title="View my work">See how my designs can help you.</a></p>
</div>
As you can see, I do the same thing for the h3 within that 'sidebar' div. That one works in all tested browsers, no problem. This makes me even more confused.
Here's the CSS for the h3:
#sidebar h3 {
position: absolute;
bottom: 42px;
right: 10px;
width: 158px;
height: 32px;
}
#sidebar h3.rnd1 { background: url(../imgs/side_h3_1.gif) left top no-repeat; }
#sidebar h3.rnd2 { background: url(../imgs/side_h3_2.gif) left top no-repeat; }
#sidebar h3.rnd3 { background: url(../imgs/side_h3_3.gif) left top no-repeat; }
#sidebar h3.rnd4 { background: url(../imgs/side_h3_4.gif) left top no-repeat; }
#sidebar h3.rnd5 { background: url(../imgs/side_h3_5.gif) left top no-repeat; }
These code examples should give me the second random background, and the third random h3 image. And they do, except on IE6 which doesn't show any background other than the first random background (the h3 works fine in all).
Also, the rand# and rnd# are generated by PHP to change every page load.
Any ideas?
#sidebar {
width: 250px;
height: 250px;
position: absolute;
right: 0;
top: 183px;
}
#sidebar.rand1 { background: url(../imgs/rand1.gif) left top no-repeat; }
#sidebar.rand2 { background: url(../imgs/rand2.gif) left top no-repeat; }
#sidebar.rand3 { background: url(../imgs/rand3.gif) left top no-repeat; }
#sidebar.rand4 { background: url(../imgs/rand4.gif) left top no-repeat; }
#sidebar.rand5 { background: url(../imgs/rand5.gif) left top no-repeat; }
The HTML looks like this:
<div id="sidebar" class="rand2">
<h3 class="rnd3"><a href="http://kiswa.com/work" title="View my work">My Work</a></h3>
<p><a href="http://kiswa.com/work" title="View my work">See how my designs can help you.</a></p>
</div>
As you can see, I do the same thing for the h3 within that 'sidebar' div. That one works in all tested browsers, no problem. This makes me even more confused.
Here's the CSS for the h3:
#sidebar h3 {
position: absolute;
bottom: 42px;
right: 10px;
width: 158px;
height: 32px;
}
#sidebar h3.rnd1 { background: url(../imgs/side_h3_1.gif) left top no-repeat; }
#sidebar h3.rnd2 { background: url(../imgs/side_h3_2.gif) left top no-repeat; }
#sidebar h3.rnd3 { background: url(../imgs/side_h3_3.gif) left top no-repeat; }
#sidebar h3.rnd4 { background: url(../imgs/side_h3_4.gif) left top no-repeat; }
#sidebar h3.rnd5 { background: url(../imgs/side_h3_5.gif) left top no-repeat; }
These code examples should give me the second random background, and the third random h3 image. And they do, except on IE6 which doesn't show any background other than the first random background (the h3 works fine in all).
Also, the rand# and rnd# are generated by PHP to change every page load.
Any ideas?