Search code examples
cssalignmentpseudo-element

Pseudo element alignment different in FFox and Chrome


I'm trying to create a speech bubble just using CSS by using pseudo elements ::before and ::after. It looks fine to me in Chrome but the outline of the triangle looks messed up in Firefox. Does anyone know what causes this and if I can fix it?

http://jsfiddle.net/K3YSy/5/

I'm using FF 9.0.1 and Chrome 16. In firefox I get odd artifacts around the triangle that don't appear in Chrome or IE9 for that matter

enter image description here


Solution

  • Those rendering artifacts around the edge of the triangle are something I've run into on Firefox when you set some borders to transparent and others to another color. It doesn't seem to be able to properly display the boundary between the colored border and the transparent ones. Unfortunately, the only way I have ever found to fix it is to set all four of them to a color, but unfortunately that won't work for you in this case.