Search code examples
jqueryhtmlrounded-corners

How to make round corner box inside DIV tag with jquery?


I want to make round corner box inside div tag. How can I do that? Can you give me any example?


Solution

  • You can use CSS:

    .rounded-corners {
        -moz-border-radius: 20px;
        -webkit-border-radius: 20px;
        -khtml-border-radius: 20px;
        border-radius: 20px;
    }
    

    Then add the class ".rounded-corners" to your div using jQuery:

    $("#div-id").addClass("rounded-corners");