Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>CSS Test: Box Sizing - Border-Box with specified width</title>
        <link rel="author" title="Scott Johnson" href="mailto:sjohnson@mozilla.com">
        <link rel="help" href="http://www.w3.org/TR/css3-ui/#box-sizing">
        <link rel="match" href="path/to/css-ui-3/reference/box-sizing-001-ref.html">
        <meta name="flags" content="">
        <meta name="assert" content="box-sizing: border-box should make the element's (percentage) width be the distance from the left border edge to the right border edge.">
        <style>
            .container {
                width: 100px;
                height: 100px;
                background-color: red;
            }
            .container div {
                box-sizing: border-box;
                width: 50%;
                height: 100%;
                float: left;
                border: 5px solid green;
                background-color: green;
            }
        </style>
    </head>
    <body>
        <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
        <div class="container">
            <div></div>
            <div></div>
        </div>
    </body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
frivoalpro
0viewers