0

I want to display images on a dojo chart. For this i use the following code

var l_images = ["images/clearnight.png","images/clear.png","images/partlyCloudy.png","images/cloudy.png","images/showers.png","images/rain.png","images/thunderstorms.png","images/ice.png","images/flurries.png","images/snow.png","images/partlyCloudynight.png"];
        var d = new dojo.Deferred();
        for(var i=1 ; i < conditionData.length-1 ; i++ ) {
            var l_con_map = conditionData[i];
                        var l_image_id = "image"+i;
            try {
                dojo.create("img", {src: l_images[l_con_map.conditon]}, dojo.byId(l_image_id));
            } catch(e) {

                d.errback(e);
            }
        }

each l_image_id is a div with css. For example :

and the css is

.zdiv1css {
    position:absolute;
    top:240px;
    right:0px;
    left:190px;
    width:200px;

}

It is working fine for IE9 and chrome but IE8 is not displaying any image.

Please help me out Thanks in advance

1 Answer 1

0

.........................................

add

z-index:999 

as like this

.zdiv1css {
z-index:999;
}
2
  • Thanks for reply Rohit... It solves this problem but raise another i.e. I am also using dojo dialogs in my application and now the images are comes on the dialog. I think this is due to absolute position given in the css. Can i do something else so that the problem can be resolved??? also i want to ask what is z-index?
    – Ashutosh
    Commented Sep 26, 2012 at 12:43
  • The z-index property specifies the stack order of an element. An element with greater stack order is always in front of an element with a lower stack order. z-index only works on positioned elements (position:absolute, position:relative, or position:fixed). img { position:absolute; left:0px; top:0px; z-index:-1; }
    – sachit
    Commented Sep 27, 2012 at 4:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.