Search code examples
csscss-selectorsattrpseudo-elementpseudo-class

How to get CSS pseudo-elements to look the same cross browser?


Here is a very basic demo of what I'm trying to accomplish.

Open in Google Chrome: http://jsfiddle.net/8EbxG/4/

It should look like there's nothing there, except for a grey rectangle.

Now, open in IE9, or Firefox.

You will see an empty white rectangle contained within the larger grey one.

What do I need to do to get this looking like it does in chrome Chrome cross browser (I haven't even tested older IE, or Opera, or Safari)?


Solution

  • add this css:

    #sb-caption:empty {display:none;}