css - Rounded corner div in IE(6/7) -


here's code rounded div. works fine except ie(6/7), in ie(8/9) it's pretty good, , other browsers seem nice on rounded div. described later after code.

html code:

<div id="tweets">     <div id="tweets_text">         <div id="tweets_text_top">             <div id="tweets_top_left">             </div><!--#tweets_text_left-->                                       <div id="tweets_top_right">             </div><!--#tweets_text_right-->         </div><!--#tweets_text_top-->                                <div id="tweets_text_middle">             text here....         </div><!--#tweets_middle-->                              <div id="tweets_text_bottom">             <div id="tweets_bottom_left">             </div><!--#tweets_text_left-->                                       <div id="tweets_bottom_right">             </div><!--#tweets_text_right-->         </div><!--#tweets_text_bottom-->                         </div><!--#tweets_text-->                </div><!--#tweets--> 

css code:

#tweets{     clear: both;     margin-bottom: 10px;     padding: 0px;     border: 0px; } #tweets_text{     width:214px;         clear: both;     margin: 0px;     padding: 0px;     border: 0px;     background: #141414; } #tweets_text_top, #tweets_text_bottom{     width: 214px;     height: 10px;     background: #000000;         clear: both;     } #tweets_top_left{     height: 10px;     width: 10px;     background: url('images/top_left.jpg') no-repeat;        float: left;     clear: left; } #tweets_top_right{     height: 10px;     width: 10px;     background: url('images/top_right.jpg') no-repeat;     float: right;     clear: right; } #tweets_bottom_left{     height: 10px;     width: 10px;     background: url('images/bottom_left.jpg') no-repeat;     float: left;     clear: left; } #tweets_bottom_right{     height: 10px;     width: 10px;     background: url('images/bottom_right.jpg') no-repeat;     float: right;     clear: right;    } #tweets_text_middle{         width: 200px;     padding: 7px;     background: #000000;     color: #f4f4f4;     font-size: 12px;     } 

the images here: rounded div's images

now occurs in ie(6/7). bottom portion isn't rounded top portion. if test, hope find asked for. if 1 can find mistake grateful.

if have problem understand or docs, let me know.

thanks.

here's popular jquery round corner plugin.

http://jquery.malsup.com/corner/

it's supported in browsers including ie6. draws corners in ie using nested divs (not images). has native border-radius rounding in browsers support (opera 10.5+, firefox, safari, , chrome). in browsers plugin sets css property instead.

here's how use it

you need include jquery , corner js script before </body>. write jquery $('div, p').corner('10px'); , place before ''. html below code. here i'm making round corners div , p tags. if want specific id or class can $('#myid').corner();

<body>     <div class="x"></div>     <p class="y"></p>     <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>     <script type="text/javascript" src="http://github.com/malsup/corner/raw/master/jquery.corner.js?v2.11"></script>     <script>$('div, p').corner();</script> </body> 

check working example @ http://jsfiddle.net/vlppk/1


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -