[Solved] CSS border-radius not applied to DropDownList in ASP.Net

Last Reply 22 days ago By dharmendr

Posted 23 days ago

I am using visual studio 2008 so border radius is giving error but still i have used everything to style my dropdown but it is still css is not applying on it.

Css 2.0 Border-radius is not a known css property

<div>
    <asp:DropDownList ID="DropDownList3" CssClass="mydropdownlist" runat="server" class="form-control input-lg">
        <asp:ListItem>Allahabad</asp:ListItem>
        <asp:ListItem>Kanpur</asp:ListItem>
        <asp:ListItem>Rewa</asp:ListItem>
        <asp:ListItem>Bhopal</asp:ListItem>
        <asp:ListItem>Indore</asp:ListItem>
        <asp:ListItem>Jabalpur</asp:ListItem>
    </asp:DropDownList>
</div>

 

<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<script src="../../Bootstrap/js/jquery-1.11.3.js" type="text/javascript"></script>
<script type="text/javascript" src="../../Bootstrap/js/jquery-1.11.3.min.js"></script>
<script src="../../Bootstrap/js/bootstrap.min (2).js" type="text/javascript"></script>
<link href="../../Bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<script src="../../Bootstrap/js/bootstrap-select.min.js" type="text/javascript"></script>
<link href="../../Bootstrap/css/bootstrap-select.min.css" rel="stylesheet" />
<link href="../../Bootstrap/css/bootstrap-multiselect.css" rel="stylesheet" />
<script src="../../Bootstrap/js/bootstrap-multiselect.js" type="text/javascript"></script>

 

<style type="text/css">
    .mydropdownlist
    {
        color: #fff;
        font-size: 20px;
        padding: 5px 10px;
        border-radius: 5px;
        background-color: #cc2a41;
        font-weight: bold;
    }
</style>

 

You are viewing reply posted by: dharmendr 22 days ago.
Posted 22 days ago

Hi itsme,

Check with the below css.

<style type="text/css">
    .mydropdownlist
    {
        color: #fff !important;
        font-size: 20px !important;
        padding: 5px 10px !important;
        border-radius: 5px !important;
        background-color: #cc2a41 !important;
        font-weight: bold !important;
    }
</style>