Why did the background image appear in Chrome, but not in IE?

I have a background image set for my main div. The background image is displayed in Chrome, but not displayed at all in IE. Any ideas on what might cause this?

<div class="container" style="height:900px; margin-top:0px; background-image:url(Images/bg-stadiuminner.jpg); background-repeat:no-repeat;;"> 

thank

+3
source share
6 answers

The only thing I can think of is that the JPEG file is in CMYK format and not in JPG. IE cannot digest CMYK images.

I think a layout issue may be more likely. Are you 100% sure that the DIV is stretching to where you expect it to stretch? What happens if you set the background color?

+4
source

A few thoughts:

  • , div.
  • , <div> </div>. , , , , .
+1
.container {
    height:900px; 
    margin-top:0px;
    background:url(images/bg-stadiuminner.jpg) no-repeat;
}

<div class="container">

</div> 

- , , , .

;; IE.

+1

URL ? URL- IE , URL-.

0

URL?

style="background-image:url('paper.gif');"
0

You use the inline style and also use the class container. There is no problem in the embedded code except for ';;' at the end of the line. We cannot see what is in the container class. The problem may be in the container class

0
source

Source: https://habr.com/ru/post/1764164/


All Articles