HTML Using DIV vs. Table -


what use div's vs. table.

i show image , right of image show text. text should aligned top edge of image. there should spacing between text image.

i have following code seems image comes , text comes below it:

     <div style="float:left">         <img src="../../images/img1.png" alt="description" width="32" height="32"></a></p>      </div>         <div style="clear:left"></div>       <div style="float:left">              %#eval("title")        </div>       <div style="clear:left"></div> 

you use float/overflow trick:

<div class="imgcont">     <img src="../../images/img1.png" alt="description" width="32" height="32"> </div> <div class="text">         %#eval("title")   </div> 

i used classes instead of inline styling:

.imgcont{float:left; margin-right:10px;} .text{overflow:hidden;} 

jsfiddle


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -