views:

186

answers:

1

I was trying to get rounded corners in IE7 using jQuery's "ui-corner-all" class. This is how my page looks like.

<html>
<head>
<script language="javascript" type="text/javascript" src="jquery.js"></script>

<script language="javascript" type="text/javascript">
    $(document).ready(function() {
         $('#btnSearch').addClass("ui-corner-all");
    });
</script>
</head>
<body>
<!--some code here-->
<asp:Button ID="btnSearch" Text="Search" runat="server" OnClick="btnSearch_Click" />
<!--some code here-->
</body>
</html>

But, I'm not able to get that effect of rounded corners. Am I doing something wrong here? I also tried including jQuery's smoothness.css file, but still nothing worked!

+3  A: 

.ui-corner-all is a CSS class in the jQuery UI CSS framework, it's not just available. Even then...it doesn't work in IE < 9 :)

If you need to support IE < 9, you may want to look at the jQuery Corner plugin.

You can see what various IE versions support here. The relevant part is it doesn't support border-radius. This (along with the custom mozilla and webkit versions before the spec) is what the .ui-corner-xxx classes use to get CSS rounded corners.

Nick Craver