Mac not showing dynamically added images

A

Andrew Poulos

I don't have access to a Mac but, as a substitute, I test on Windows Safari.

A client has told me that a user of theirs who is on a Mac cannot see
the images that are dynamically added to a "main menu" page. The client
can't yet tell me what OS or browser the user has.

The code is something like this:

var myimg = document.createElement("img");
myimg.src = "images/mm1.png";
myimg.style.visibility = "visible";
document.getElementById("container").appendChild(myimg);

The "container" has this CSS

..mainmenu {
position:absolute;
width:200px;
height:200px;
display:block;
}

and the images within the container have this CSS

..mainmenu img {
border:none;
visibility:hidden;
}

Why would a Mac not show the images?

Andrew Poulos
 
T

Thomas 'PointedEars' Lahn

Andrew said:
A client has told me that a user of theirs who is on a Mac cannot see
the images that are dynamically added to a "main menu" page. The client
can't yet tell me what OS or browser the user has. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The code is something like this:

var myimg = document.createElement("img");
myimg.src = "images/mm1.png";
myimg.style.visibility = "visible";
document.getElementById("container").appendChild(myimg);

What is "container"?
The "container" has this CSS

.mainmenu {
position:absolute;
width:200px;
height:200px;
display:block;
}

and the images within the container have this CSS

.mainmenu img {
border:none;
visibility:hidden;
}

Why would a Mac not show the images?

My Magic 8-Ball says: "Ask again later." However, why would you hide images
*by default*? Hiding things by default through CSS is almost always a BAD idea.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top