In a simple web page I load some new HTML into a div using load(url) Works fine in most browsers but, surprise, surprise, IE7 behaves differently. All the other browsers apply the pages CSS styles to the newly loaded HTML but IE7 doesn't.
Any ideas?
Ken
Update The new HTML is just a code fragment, e.g.
<div class="classname">
blah blah blah
</div>
Update I think I'm calling it OK. This isn't what I'm actually doing but a simplified version which reproduces the problem ...
.
.
.
google.load("jquery", "1.3.2");
google.setOnLoadCallback(function() {
$(document).ready(function() {
$("#nav-home").click(function() {
$("#girc-content").load("home.html");
});
.
.
.
Update On further investigation the problem appears to be slightly more odd than I thought.
I tried Steerpike's suggestion because I originally thought the problem was that the CSS styles were not being applied.
However, it now appears that only some of the styles are being applied.
For example, the text color attribute for the <h2>
tag is applied, but the width attribute for the <div>
tag is not.