I'm having the weird problem that after having javascript inject some dom-elements the css-rules defined for those elements are not obeyed in IE7(i.e: styling for these elements doesn't happen). (firefox and chrome work fine, others not tested)
Things I tried: - cleared the cache - no other css-rule takes precedence (no 'more-specific' styles, etc. )
the JS (in the body) (I used prototype for the injection here, but I don't think its related) (ABout the Js: some Jsonp trickery adding photos to a div based on latitude/longitude)
<script type="text/javascript">
function ws_results(json) {
var div = document.createElement('div');
div.setAttribute('class', 'pano_img_cont');
var paras = $A(json.photos);
paras.each(function(para){
var img = document.createElement('img');
img.setAttribute('src', para.photo_file_url);
div.appendChild(img);
});
var cc = $('panaramio_anchor');
Element.insert(cc.up(),{top:div});
}
</script>
<script src="http://www.panoramio.com/map/get_panoramas.php?order=popularity&amp;set=public&amp;from=0&amp;to=15&amp;minx=13.375&amp;miny=52.4917&amp;maxx=13.424999&amp;maxy=52.541702&amp;size=square&amp;callback=ws_results" type="text/javascript"></script>
THE CSS (to be sure, added as last styles in ie.css)
.pano_img_cont{
display:block;
float:left;
position:relative;
width:100%;
margin-left:6px;
margin-top:3px;
padding-right:5px;
margin-bottom:-18px;
white-space:normal;
padding:10px;
background:#f00;
}
.pano_img_cont img{
display:inline-block;
width:67px;
height:55px;
margin:0 3px 5px 3px;
background:#eee;
float:left;
}
Anyone knows what's up? perhaps css doesn't do a 're-run' of css-styling after the dom is updated automatically? hmm, just guessing here..
Thanks.