three pixel offset by margin : margin left : Box Model HTML CSS TUTORIALS


HTML CSS TUTORIALS » Box Model » margin left »

 

three pixel offset by margin


 

<!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;
            }
            div#float {
                background: lightgrey;
                float: left;
                border: 1px solid black;
                width: 75px;
                height: 50px;
            }
            {
                margin-left: 76px;
                border: 1px solid black;
            }
        </style>
    </head>
    <body>
        <div id='container'>
            <div id='float'>
                Float text.
            </div>
            <p>
                Paragraph text. Paragraph text. Paragraph text. 
            </p>
        </div>
    </body>
</html>

 



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo Box Model
» margin left