I have this simple DIV that displays fine in Firefox, Chrome etc, but not IE. I have the following html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<style>
div.example {
position:absolute;
color:black;
text-align:left;
border:2px solid#000;
border-radius:15px;
-moz-border-radius:15px;
}
</style>
</head>
<body>
<div class="example" style="height:15em;width:10em;"></div>
</body>
</html>
In Firefox I get a rounded 2px black border. In IE get nothing. From what I’ve read, rounded borders isn’t supported until IE9, but I would like the 2px black border, even if it’s not rounded. Is there anyway to get this to look the same in Firefox, Chrome, IE & Safari ? Thanks in advance 🙂
You are missing a space in the border style.
Here is a working demo.
HTML
CSS
Also, as a side note,
border-radiusshould always be called after-prefix-border-radius,example of order: