Results 1 to 3 of 3

Thread: CSS Rounded Corners

  1. #1
    Join Date
    Nov 2010
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default CSS Rounded Corners

    A common topic, I realize. But is there anyway to style a rounded rectangle in CSS that will be supported by all major browsers (including IE7+)? Preferably no graphics involved, although I would greatly appreciate nearly any simple solution. Thank you.

  2. #2
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    I'm no expert in this area, but I use

    Code:
    <style type="text/css">
    .clear 
    {
    font-size: 1px; height: 1px;
    }
    .bl 
    {
    background: url(http://www.animeviews.com/images/pops/bl3.png) 0 100% no-repeat;
    } 
    .br 
    {
    background: url(http://www.animeviews.com/images/pops/br3.png) 100% 100% no-repeat;
    } 
    .tl 
    {
    background: url(http://www.animeviews.com/images/pops/tl3.png) 0 0 no-repeat;
    } 
    .tr 
    {
    background: url(http://www.animeviews.com/images/pops/tr3.png) 100% 0 no-repeat;padding:1em;
    } 
    
    </style>
    
    <div style='width:10%;background-color:red;'><div class='bl'><div class='br'><div class='tl'><div class='tr'>vf</div></div></div></div></div><div style='width:10%;background-color:red;'><div class='bl'><div class='br'><div class='tl'><div class='tr'>vf</div></div></div></div></div>
    see also http://www.roundedcornr.com/
    http://articles.sitepoint.com/articl...s-boxes-curves
    To choose the lesser of two evils is still to choose evil. My personal site

  3. #3
    Join Date
    Feb 2009
    Posts
    303
    Thanks
    18
    Thanked 36 Times in 36 Posts

    Default

    I don't think round corners need to be cross-browser. I think use the CSS3 round corners syntax, and screw IE. :P

    If a visitor is using IE, they won't get some of the frills of the design like rounded corners and drop shadows (if CSS3), but is it really that important? I figure it's their fault for not using a "proper" web browser.

    Until IE9, of course.
    Alex Blackie, X96 Design
    My Website
    I specialize in: HTML5, CSS3, PHP, Ruby on Rails, MySQL, MongoDB, Linux Server Administration

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •