Internet Explorer doesn't recognise the 'html' css background image tag?

后端 未结 2 1423
感情败类
感情败类 2020-12-22 01:44

I was basically wondering if there was a work around to this? I was redesigning my old mans plumbing website, and took a few of the ideas from this website http://visitmix.c

2条回答
  •  鱼传尺愫
    2020-12-22 02:19

    I know this question has been answered and is older, but I wanted to share my solution in case someone else comes across this. I was having the same problems when I used a background image on my tag. The solution was to have the correct DOCTYPE. Below is the one I used:

        
    

    I also added @charset "utf-8"; to the top of my style sheet.

    The way I formatted my background attribute is also different than how you have yours, but I do not know if that makes a difference.

        html {
               background: url("../images/html_bg.jpg") #000 repeat-x;
        }
    

    I was able to have both a and background image that worked in Firefox and IE.

提交回复
热议问题