float with default margin padding : float and position : Layout HTML CSS TUTORIALS


HTML CSS TUTORIALS » Layout » float and position »

 

float with default margin padding


 
<!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'>
                body {
                   margin: 0;
                   padding: 8px;
                }
        p#floated {
            float: left;
        }
        {
            border: thin solid black;
        }
            </style>
        </head>
        <body>
        <p id='floated'>
          This paragraph is floated left.
        </p>
        <p id='normal'>
          The text of this paragraph is beside the floated paragraph.
        </p>
        </body>
    </html>

 



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo Layout
» float and position