I am puzzled by a situation where my HTML layout to present financial data does not seem to update properly in certain browsers. Despite using jQuery and inspecting it with Firebug, the visual display of the parent divs remains unaltered. This issue becomes more evident when viewed in a web browser.
For styling, I have incorporated the Bluetrip CSS framework.
Below is the HTML code snippet:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>test</title>
<meta http-equiv="content-type" content="text/html; charset=us-ascii" />
<link rel="stylesheet" href="screen.css" type="text/css" media="screen, projection" />
<!--[if IE]>
<link rel="stylesheet" href="ie.css" type="text/css" media="screen, projection" />
<![endif]-->
<link rel="stylesheet" href="test.css" type="text/css" media="screen, projection" />
<link href="jquery.css" media="screen" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script>
$(function() {
$('#txn-41').css("background-color", 'yellow')
});
</script>
</head>
<body>
<div class="container">
<div class="main span-19">
<div class="span-19 push-1">
<h2>Recently added</h2>
<div id="transaction-list">
<div id="transactions">
<div class="header">
<div class="cell span-3">
date
</div>
<div class="cell span-3">
w/d
</div>
<div class="cell span-3">
deposit
</div>
<div class="cell span-3">
category
</div>
<div class="cell span-3">
user
</div>
<div class="cell span-3">
account
</div>
</div>
<div id="txn-41">
<div class="cell date" title="Monday September 21, 2009">
2009-09-29
</div>
<div class="cell wd">
$2,233.00
</div>
<div class="cell deposit">
</div>
<div class="cell category">
Entertainment
</div>
<div class="cell user">
Tim
</div>
<div class="cell account">
Checking
</div>
</div>
<div id="edit-txn-41" style="display: none; clear: both;"></div>
<div id="txn-40">
<div class="cell date" title="Monday September 21, 2009">
2009-09-29
</div>
<div class="cell wd">
$5,555.00
</div>
<div class="cell deposit">
</div>
<div class="cell category">
Groceries
</div>
<div class="cell user">
Tim
</div>
<div class="cell account">
Checking
</div>
</div>
<div id="edit-txn-40" style="display: none; clear: both;"></div>
<div id="txn-39">
<div class="cell date" title="Monday September 21, 2009">
2009-09-29
</div>
<div class="cell wd">
$5,555.00
</div>
<div class="cell deposit">
</div>
<div class="cell category">
Groceries
</div>
<div class="cell user">
Tim
</div>
<div class="cell account">
Checking
</div>
</div>
<div id="edit-txn-39" style="display: none; clear: both;"></div>
<div id="txn-38">
<div class="cell date" title="Monday September 21, 2009">
2009-09-29
</div>
<div class="cell wd">
$123.00
</div>
<div class="cell deposit">
</div>
<div class="cell category">
Groceries
</div>
<div class="cell user">
Tim
</div>
<div class="cell account">
Checking
</div>
</div>
<div id="edit-txn-38" style="display: none; clear: both;"></div>
<div id="txn-37">
<div class="cell date" title="Monday September 21, 2009">
2009-09-29
</div>
<div class="cell wd">
$223.00
</div>
<div class="cell deposit">
</div>
<div class="cell category">
Entertainment
</div>
<div class="cell user">
Tim
</div>
<div class="cell account">
Savings
</div>
</div>
<div id="edit-txn-37" style="display: none; clear: both;"></div>
<div id="txn-36">
<div class="cell date" title="Monday September 21, 2009">
2009-09-29
</div>
<div class="cell wd">
$998.00
</div>
<div class="cell deposit">
</div>
<div class="cell category">
Entertainment
</div>
<div class="cell user">
Tim
</div>
<div class="cell account">
Savings
</div>
</div>
<div id="edit-txn-36" style="display: none; clear: both;"></div>
<div id="txn-34">
<div class="cell date" title="Monday September 21, 2009">
2009-09-29
</div>
<div class="cell wd">
$20.00
</div>
<div class="cell deposit">
</div>
<div class="cell category">
Groceries
</div>
<div class="cell user">
Tim
</div>
<div class="cell account">
Checking
</div>
</div>
<div id="edit-txn-34" style="display: none; clear: both;"></div>
</div>
</div>
</div>
</div>
<div class="sidebar span-5 last"></div>
</div>
</body>
</html>
This is the accompanying CSS stylesheet:
/* @override http://localhost:3000/stylesheets/dough.css */
body {
background-color: #E5E5E5;
}
.main, .sidebar {
background-color: white;
padding-top: 8px;
}
.clear {
clear: both;
}
.txn {
clear: both;
}
.cell {
float:left;
margin-right: 10px;
font-size: 14px;
}
.cell.date {
width: 110px;
}
.cell.wd {
width: 110px;
text-align: right;
}
.cell.deposit {
width: 110px;
text-align: right;
}
.cell.category {
width: 110px;
}
.cell.user {
width: 110px;
}
.cell.account {
width: 110px;
}
An interesting observation one can make using Firebug or Safari's inspect element feature is that while the jQuery manipulation successfully alters the #txn-41 div's style properties, these changes are not reflecting in the actual browser rendering.
What could be causing the #txn-41 div to remain invisible even though its contents are visible? I am struggling to apply effects to the parent container!
Your help regarding this matter would be highly appreciated. Thank you.