The following script shows an image next to some text. It doesn’t work with IE7. How should it be modified? Thanks
<style type="text/css">
div {width:200px}
div span {
padding: 0 5px 0 30px;
background-image: url("bg.gif");
background-position:center;
background-repeat: no-repeat;
}
</style>
<body>
<div>Text 1<span></span></div>
<div>Text 2<span></span></div>
<div>Text 3<span></span></div>
</body>
Have you specified a doctype in the html page?
e.g.: