1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Best Method to add Rounded Corners to a Div

Discussion in 'CSS' started by FishSword, Jan 9, 2011.

  1. #1
    Hiya,

    I have a div contained inside a another div. What's the best way to center the parent div horizontally and vertically, and add images of rounded corners to all 4 corners.

    Please see attached an image of what I'm trying to create.

    Cheers ;)
     
    FishSword, Jan 9, 2011 IP
  2. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #2
    The best method is to use border-radius but this only works in modern browsers and not IE.
     
    drhowarddrfine, Jan 9, 2011 IP
  3. FishSword

    FishSword Active Member

    Messages:
    131
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #3
    I need it to work in IE also, that's why I need to use images.
     
    FishSword, Jan 9, 2011 IP
  4. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #4
    Reason #3678 no one should ever use IE. It dumbs down the web and makes extra work for developers.
     
    drhowarddrfine, Jan 9, 2011 IP
  5. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #5
    As drhowarddrfine has already pointed out "border-radius" is the way for modern browser. And if you want to avoid images then you can use javascript. I've used http://www.dillerdesign.com/experiment/DD_roundies/ for few of my websites.
     
    radiant_luv, Jan 9, 2011 IP
  6. FishSword

    FishSword Active Member

    Messages:
    131
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #6
    I want to use images, and need to display them properly in IE (Including IE 6.0). What's the best way?
     
    FishSword, Jan 9, 2011 IP
  7. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #7
    Read my last post,

    and yes, it works on IE6, perhaps you could have done little research with the link provided before shooting more queries.
     
    radiant_luv, Jan 9, 2011 IP
  8. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
    #8
    There a other javascript solutions, but you seem to be too lazy to use Google.

    I know it is easier to let others do the work for you, but then you will never learn anything!
     
    CSM, Jan 9, 2011 IP