How to make rounded corner using CSS

Discussion in 'CSS' started by adexpert10, Oct 26, 2010.

  1. #1
    I am trying to make rounded corner rectangle using css. I am not able to make it , can anyone tell me how can I do that?
     
    adexpert10, Oct 26, 2010 IP
  2. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #2
    The CSS3 border-radius property allows utilize rounder corners in design elements, without the need for corner images or the use of multiple div tags, and this is perhaps one of the most talked about aspects of CSS3. However, IE6,7,8 doesn't support it. I've heard IE9 is supporting this property.
     
    #example1 {
    border-radius: 15px;
    }
    
    Code (markup):
    However, for the moment, you might need to use the -moz- prefix to support Firefox

     
    #example1 {
    -moz-border-radius: 15px;
    webkit-border-radius:15px;
    border-radius: 15px;
    } 
    
    Code (markup):
     
    radiant_luv, Oct 26, 2010 IP
  3. hirensoni913

    hirensoni913 Peon

    Messages:
    79
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    border-radius : 10px;
    won't support on CSS2.1
    You can use
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -khtml-border-radius: 10px;
     
    hirensoni913, Oct 27, 2010 IP
  4. Turtles

    Turtles Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I thought you had to use an image?
     
    Turtles, Oct 27, 2010 IP
  5. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #5
    Not for any modern browser. Only IE.
     
    drhowarddrfine, Oct 27, 2010 IP
  6. WuLF

    WuLF Peon

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    WuLF, Oct 28, 2010 IP
  7. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #7
    No you cannot. That does not use CSS at all.
     
    drhowarddrfine, Oct 28, 2010 IP
  8. WuLF

    WuLF Peon

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    The CSS:

    1. .curved {
    2. -moz-border-radius:10px;
    3. -webkit-border-radius:10px;
    4. behavior:url(border-radius.htc);
    5. }


    It uses both CSS and scripting.
     
    WuLF, Oct 28, 2010 IP
  9. GWiz

    GWiz Peon

    Messages:
    359
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #9
    GWiz, Oct 28, 2010 IP