0

I am creating a print CSS for IE browser, within which I have to add text and an image in a div through CSS. I am using content to add text and background to add an image, but somehow Image is not being shown.

This is how I'm doing.

#header .container:after { 
        content:  "@The_Text_after_Twitter_Logo";
        background: url("../path_to/logo-twitter.png");
        position:absolute; 
        width:999em; 
        height:25px; 
        margin:0 0 0 5px; 
}

Is this the right way to do it? Am I doing it wrong somewhere?

Thanks.

James Donnelly
  • 126,410
  • 34
  • 208
  • 218
Steve
  • 2,546
  • 8
  • 49
  • 94

1 Answers1

0

:after is a empty pseudo-class in IE, meaning it comes with no pre-defined box-model and you'll need to give it some display.

display: block;

This should do the trick.

Jamie Hutber
  • 26,790
  • 46
  • 179
  • 291