double margin fixed : margin : Box Model HTML CSS TUTORIALS


HTML CSS TUTORIALS » Box Model » margin »

 

double margin fixed


 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <title></title>
        <style type='text/css'>
            div#container {
                margin: 0 20px;
                background: red;
                width: 300px;
                height: 500px;
            }
            div#float {
                margin-left: 50px;
                background: lightgrey;
                float: left;
                border: 1px solid black;
                width: 75px;
                height: 50px;
                display: inline;
            }
        </style>
    </head>
    <body>
        <div id='container'>
            <div id='float'>
                Float text.
            </div>
        </div>
    </body>
</html>

 



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo Box Model
» margin