Block Hover Effect - Why doesn't it work correctly in FF3.6?
Posted
by Brian Ojeda
on Stack Overflow
See other posts from Stack Overflow
or by Brian Ojeda
Published on 2010-03-13T21:29:51Z
Indexed on
2010/03/13
21:35 UTC
Read the original article
Hit count: 422
Why doesn't following code work correctly in FireFox 3.6? I have tested in IE7, IE8, and Chrome with out any issues.
Issue: The first block hover link (the table's 3rd row) doesn't apply the same style/effect as the following below it.
Notes: I am trying to create my own table framework. This project is something I am doing to learn more about CSS. Before I started, I thought I knew a lot about CSS. However, to my surprise I was wrong. Who knew? Moving on... As side note, I do not want to take the time to support IE6. So, if you see a problem related IE6, please don't waste your time telling. One another side note, the following style script and HTML listed when this question is strip-down/bare-bone of the complete CSS/HTML. It should be enough to assist me.
CSS:
/* Main Properties */
.ojtable{display:block;clear:both; margin-left:auto;margin-right:auto;
margin-top:0px; width:650px;}
.ojtable-row, .ojtable-head
{display:block;clear:both;position:relative;
margin-left:0px;margin-right:0px;padding:0px;}
.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9,
.col-10, .col-11, .col-12, .col-13, .col-1-b1, .col-2-b1, .col-3-b1,
.col-4-b1, .col-5-b1, .col-6-b1, .col-7-b1, .col-8-b1, .col-9-b1, .col-10-b1,
.col-11-b1, .col-12-b1, .col-13-b1
{display:block;float:left;position:relative;
margin-left:0px;margin-right:0px;padding:0px 2px;}
/* Border */
.border-b1{border:solid #000000; border-width:0 0 1px 0;}
.border-ltr{border:solid #000000; border-width:1px 1px 0 1px;}
/* Header */
.ojtable-row{width:100%;}
.ojtable-head{width:100%;}
/* No Border*/
.col-2{width:96px;}
/* Border: 1px */
.col-2-b1{width:95px;}
.col-7-b1{width:345px;}
/*--- Clear Floated Elements ---*/
/* Credit: http://sonspring.com/journal/clearing-floats */
.clear {
clear: both;
display: block;
overflow: hidden;
visibility: hidden;
width: 0;
height: 0;
}
/* Credit: http://perishablepress.com/press/2008/02/05/
lessons-learned-concerning-the-clearfix-css-hack/ */
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
.clearfix { display:inline-block; }
/* start commented backslash hack \*/
* html .clearfix { height: 1%; }
.clearfix { display: block; }
/* close commented backslash hack */
/*--- Hover Effect for the Tables ---*/
a {text-decoration:none;}
* .ojtable a .ojtable-row{width:650px; display:block; text-decoration:none;}
* html .ojtable a .ojtable-row {width:650px;}/* Hover Fix for IE */
.ojtable a:hover .ojtable-row{background:#AAAAAA; cursor:pointer;}
HTML:
<div class="ojtable border-ltr clearfix">
<div class="ojtable-row border-b1 clearfix">
<div class="col-13">Newest Blogs</div>
</div>
<div class="ojtable-row border-b1 clearfix">
<div class="col-7-b1 border-r1">Name</div>
<div class="col-4-b1 border-r1">Creater's Name</div>
<div class="col-2">Dated Created</div>
</div>
<a href="#"><div class="ojtable-row border-b1 clearfix">
<div class="col-7-b1 border-r1">Why jQuery?</div>
<div class="col-4-b1 border-r1">Gramcracker</div>
<div class="col-2">Mar 11 2010</div>
</div></a>
<a href="#"><div class="ojtable-row border-b1 clearfix">
<div class="col-7-b1 border-r1">Thank You For Your Help</div>
<div class="col-4-b1 border-r1">O'Hater</div>
<div class="col-2">Nov 2 2009</div>
</div></a>
<a href="#"><div class="ojtable-row border-b1 clearfix">
<div class="col-7-b1 border-r1">Click Me! Hahaha!</div>
<div class="col-4-b1 border-r1">Brian Ojeda</div>
<div class="col-2">Nov 29 2008</div>
</div></a>
<a href="#"><div class="ojtable-row border-b1 clearfix">
<div class="col-7-b1 border-r1">Moment of Zen</div>
<div class="col-4-b1 border-r1">Jedi</div>
<div class="col-2">Mar 11 2010</div>
</div></a>
<a href="#"><div class="ojtable-row border-b1 clearfix">
<div class="col-7-b1 border-r1"></div>
<div class="col-4-b1 border-r1">SGT OJ</div>
<div class="col-2">Mar 11 2010</div>
</div></a>
</div> <!-- End of Table -->
PS: Thank you for assistant, if you do choose to help.
© Stack Overflow or respective owner