0

Here are two images of a graph that I had made on an excel sheet:

I have made this website for a project, nothing much fancy. For some reason, these two images are not being displayed, at all, when I open up the part of the website that should contain those images, on Internet Explorer 11. On Chrome, they do get displayed as I would expect them to.

I am simply using the <img> tag, nothing much special.

I have learned the whole HTML/CSS/JavaScript thing by myself, have encountered a lot of problems, but so far I have always been able to solve them either by myself or by searching. This time, I am so frustrated that I have to seek for help actively, as I do so now.

I have produced those images on Paint.NET if that matters.

Some code for whoever that looks for one:

<!DOCTYPE html>

<html>

    <head>
    </head>

    <body>
        <div>
            <img src="2256704-13.jpg">
            <img src="costbenefitgraphbackground.png" alt="" />
            <img src="costbenefitgraph.png" alt="" />
        </div>
    </body>

</html>

This is assuming that you have renamed the files accordingly. With that code, Chrome displays the images while IE 11 doesn't.

Here is an example image that gets properly displayed on IE 11, on my end at least: http://fc09.deviantart.net/fs71/f/2014/157/d/5/2256704_13_by_thoappelsin-d7lb3y3.jpg (2256704-13.jpg in code)

Utkan Gezer
  • 3,009
  • 2
  • 16
  • 29
  • @myfunkyside added some code, in its simplest possible form. – Utkan Gezer Jun 06 '14 at 23:21
  • this is probably not gonna make a difference, but try removing the spaces in the image-names (use camelCase or underscore instead), and mkae the img-tag like this: `` (notice the space and slash ` />`, that's the official w3-way – myfunkyside Jun 06 '14 at 23:29
  • The slash is not necessary. http://stackoverflow.com/questions/3558119/are-self-closing-tags-valid-in-html5 – JustcallmeDrago Jun 06 '14 at 23:31
  • @myfunkyside I have done all that, and as you have already expected, it didn't make any difference. – Utkan Gezer Jun 06 '14 at 23:33
  • @ ThoAppelsin - to be clear, all other images are being displayed? or are these the only two images? if so, (1) try converting them to JPG (just to see what happens, and (2) change the src to another relatively small image, see if that does get displayed – myfunkyside Jun 06 '14 at 23:38
  • @ThoAppelsin - Oh, I think I may know the problem, IE doesn't like img-tags directly in the body-tag, put them in a `div` – myfunkyside Jun 06 '14 at 23:41
  • @myfunkyside That suggestion didn't work, though it was obvious to me, since they already are contained in a `div` in my actual HTML document. As for JPG conversion, I had already tried that with many file types, which had no use. One interesting thing; IE failed to display some other random images on my folders, except for this one: I'll link it on my question, also update the *some code*. – Utkan Gezer Jun 06 '14 at 23:53
  • @ThoAppelsin - And you get no errors in the DevTools-console? If you have the website online, could I get a link (if not, could you check the DevTools-Elements to see if the img-tags are there, or if maybe you can find another clue there? – myfunkyside Jun 06 '14 at 23:57
  • @myfunkyside Nope, no errors. The other two images are acknowledged and there anyway, they even have dimensions, `28 x 30`. And I have to remind that this is only for IE 11. Chrome does display them, IE 11 doesn't. – Utkan Gezer Jun 07 '14 at 00:01
  • @ThoAppelsin - For now, I'm out of ideas:( It's hard to look for possibilities without seeing the website for real or at least the actual code. Only thing I can think of now is that IE sometimes blocks content if you open a website from your harddisk (i.e. not from a server), but you would probably have seen a warning message for that.. – myfunkyside Jun 07 '14 at 00:11
  • @ThoAppelsin - One last question: those links to the images at the start of you question, they don't show either in your IE? 'Cause they do for me, so then I think it's really a problem with your IE version (I have 11 as well btw) – myfunkyside Jun 07 '14 at 00:16
  • LAST SOLUTION (sorry for all the separate comments): Open the png's in Windows Paint and resave them as PNG (and if that doesn't help as JPG), see if those are showing, then it's possibly some metadata in the images because of the www.paint.net service that causes the issue. – myfunkyside Jun 07 '14 at 00:23
  • @myfunkyside I had tried using Windows Paint to see if they would work after re-saving images with it, both in PNG and JPG formats, although it wouldn't be acceptable for me to lose transparency, which Windows Paint doesn't support. Even like that, images didn't get displayed. I can see the images when they are on the internet, which I had realized and found odd. It's not like images are any ActiveX content or anything, and even if they were, all I'd need to do is allow such content after receiving the warning for that. I also had tried replacing my images with online versions that I can see. – Utkan Gezer Jun 07 '14 at 00:29
  • But you can't put your website online as it is now, to see if the images do show then? (I know they should just show, but at this point we have to rule out every possibility) – myfunkyside Jun 07 '14 at 00:36
  • @myfunkyside I don't really know how I can make my website online... – Utkan Gezer Jun 07 '14 at 00:53
  • use [jsfiddle.net](http://jsfiddle.net). Just put your code in there, save it and then copy the url from the address bar and open it in IE. – myfunkyside Jun 07 '14 at 01:17

1 Answers1

0

do you have any CSS attached to those images? Are you by chance using a theme that you bought somewhere? I would check it for CSS that specifically applies to IE. Some theme builders write specific browser instructions into their css.

Laura Schoebel
  • 114
  • 1
  • 13
  • This is not an appropriate Stack Overflow answer. Apart from that, as you may see from my question, CSS or anything else is not a concern. Just check the code I've added and the two sentences followed by that. – Utkan Gezer Jun 06 '14 at 23:37
  • I'm sorry if this was not helpful. I meant to write it as a comment but didn't have enough reputation to do so. – Laura Schoebel Jun 06 '14 at 23:47