Border style detection

Simple experiment to illustrate the fact that Safari and Mozilla cannot currently detect the style (in this case: width) of a node border. Chrome seems to be able to.

by Riccal

HTML

<!DOCTYPE html>
<html lang="en" class="js">
<head>
  <title>Browser css border detection (jQuery)</title>
</head>

<body>
  <section class="testbox wrap">
    <p id="op">--</p>      
  </section>
</body>
</html>

CSS

.wrap     { 
    margin:0 auto;
}

.testbox  {
    width:95%;
    height:50px; 
    background:rgba(0,0,0,0.4);
    border:1px solid #f00;
    margin-top:100px;
}

p         {
    font-size:1.0em;
    display:block;
    text-align:center;
    line-height:50px;
    color:#fff;
}

JavaScript

var border = $(".testbox").css('border');
if (!border) { border = 'Shucks, I dunno.'; }
$("#op").html(border);