floats and percentage width : float layout : Layout HTML CSS TUTORIALS


HTML CSS TUTORIALS » Layout » float layout »

 

floats and percentage width


 

<!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: lightyellow;
            }
            div#float {
                background: lightgrey;
                float: left;
                border: 1px solid black;
                width: 75px;
                height: 50px;
            }
            div#follow {
                margin-left: 77px;   
            }
            table {
                border: 1px solid black;
                width: 100%;
            }
            td {
                border: 1px solid black;
            }
        </style>
    </head>
    <body>
        <div id='container'>
            <div id='float'>
                Float text.
            </div>
            <div id='follow'>
                <table>
                    <tr>
                        <td>
                            Table text.
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </body>
</html>

 



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo Layout
» float layout