I created some rounded corners in Photoshop for a menu item. I then added the following code in the stylesheet, which works great in Firefox and Chrome but not IE.
#tag {
background-image: url(corner1.png), url(corner2.png);
background-position: top left, top right;
background-repeat: no-repeat;
}
Internet Explorer does not display the corners, as it only accepts one background image per style. Are there any quick workarounds?
Multiple background images are supported in IE9 and above. I would just let IE8 and below have square corners but you could probably use:after to add another image if needed…
Why aren’t you using border-radius for the round corners or are they very stylised?
IE8 doesn’t support border-radius at all so it gets no round corners but it is a minor browser now so square corners are fine in most cases. You don’t really want to go too far out of your way to support older browsers especially with things that are decoration only. Otherwise you load up the page with mark up that won’t be needed in a year or so.
Can you expand on the use:after property?
It all depends on what you are doing exactly but you can use the :after element to place an extra image is some cases.