Wednesday, 28 September 2011

Difference between Div and Table


 Div :

<div>
    <div  style ="background-color :Blue ; width :100%; height :100px;">
   
    </div>
    <div style ="background-color : Yellow ;height:300px; float :left ; width :25%;">
    </div>
    <div style ="width :75%; background-color :Lime ; float : left ; height :300px;" ></div>
    <div  style ="background-color :Blue; width :100%;height:50px;"></div>
    </div>

Table:

<table style="width:100%;">
        <tr>
            <td colspan="2" style ="background-color :Navy ; height :100px;">
                </td>
        </tr>
        <tr>
            <td style ="background-color :Yellow; height :300px; " ">
              </td>
            <td style = "background-color :Silver; height:100px;">
                </td>
            <td class="style4" >
                </td>
        </tr>
        <tr>
            <td colspan="2" style ="background-color :Teal;" class="style2" >
                </td>
        </tr>
    </table>

No comments:

Post a Comment