Hi there, sorry for the long post.

I'm having some issues with IE 6 displaying images on dynamically created DOM 
elements.  Specifically, I am using Prototype's window.js to show a modal 
window in a div that contains a form for user input.  The HTML for the form is 
generated on the fly based on a framework we have developed, then we use 
window.js to render the form.  The issue is that fields that are required 
should have a background image, but the style is not being displayed.  The CSS:

.labelReq {
    color: #000;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 11px;
    background: url(/icon_requiredField.gif) no-repeat center right;
    line-height:18px;
    padding-right:13px;
    padding-top:2px;
}

I've tried messing with the CSS with no luck, I even went as far as to remove 
the background image and insert an img tag and the image still doesn't display 
(I can right click on the image and select 'Show Picture' and the image 
displays).  

I've also tried:
*       going from Transitional to Strict DOCTYPE- no luck.  
*       setting the page to no-cache - no luck.  
*       appending a JavaScript timestamp to the end of the img src to force the 
image to be pulled from the server (src="/icon_requiredField.gif?9879879873") - 
no luck.
*       changing the src of the image with JavaScript after it was displayed 
thinking that would force it - no luck.
*       using JS to re-apply the CSS class to the element (to show the 
background image) - no luck.

The weirdest thing is that in my debugging - if I use an alert to display some 
value after the div is rendered, both the CSS background image and the img tag 
will display the image.  This problem is intermittent on Win2k, IE 6 SP1.  It 
happens all the time on a WinXP Pro IE 6 SP2 box and not at all on another.  
The functionality works flawlessly in Fire Fox.

Your help is much appreciated!!!!

Andy
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to