I'm working on a tricky bit of styling that's working on Safari/Webkit but not on Firefox/Gecko. I can't figure out just what's going wrong.
Here's the HTML that I'm using:
<div class="showcase"><a href=><div class="showtit"><span class="showname">Stripes!</span> <span class="showtype">a theme</span> <span class="showdate">October 2009</span></div></a></div>
So, it creates the Showcase div, then inside that makes a link that encompasses the Showtit div (used for positioning), and then the Showname, Showtype, and Showdate spans. Here's how that's all being styled:
.showcase {
border-bottom-color: #eeeeee;
border-bottom-width: 1px;
border-bottom-style: solid;
font-size: 20pt;
}
.showtit {
text-align: left;
width: 800px;
margin: 0 auto;
padding: 20;
}
.showtit:hover{background-color: #3f3f3f;}
a .showcase {
color: black;
}
.showcase:hover {
background-color: #3f3f3f;
color: white;
}
.showcase a{color:black;}
.showcase a:hover {background-color: #3f3f3f;
color: white;}
.showtype {
text-transform: lowercase;
font-size: 0.7em;
color: #cecece;
}
.showdate {
z-index: 0;
top: 0.35em;
float: right;
position: relative;
font-size: 0.7em;
color: #cecece;
}
Messy code, I know, but this is after I've tried plugging every leak I could think of. Now, on Safari this code results in a layout like this:
imgur.com/54VFo.png
Where the middle is being hovered over. But on Firefox, I instead get this:
imgur.com/MCNYV.png
With that same middle being hovered over. So the div background hover isn't working, and, what's more, the spans I aligned on the right aren't aligning themselves.
Why is this? How do I fix this? How do I make certain this never happens again?