日期:2014-05-17  浏览次数:20715 次

新手求助:如何将这个TABLE布局转成CSS+DIV
<table   width= "253 "   height= "90 "   border= "0 "   cellpadding= "0 "   cellspacing= "0 "   >
<tr>
<td   colspan= "2 "   > <b> <a   href= "[field:filename/] "   > 1234 </a> </b> </td>
</tr> <tr>
<td   valign= "top "     class=do   style= "padding-right:3px;   line-height:18px;   word-break:break-all;word-wrap:break-word "> 1234 </td>
<td   width= "58 "   align= "left "     class=do   > 1234 </td>
</tr>
</table>

怎么把上面的TABLE布局转成CSS+DIV?高手帮帮忙.

------解决方案--------------------
<div id= "container ">
   <div id= "Header ">
   </div>
   <div id= "PageBody ">
     <div id= "Sidebar ">
     </div>
     <div id= "MainBody ">
     </div>
   </div>
</div>
------解决方案--------------------

<style>
#div {
width:253px;
height:90px;
border:0;
padding:0;
spacing:0;
}

#link {
position:relative;
width:100%;
}

#adiv {
position:relative;
width:100%;
}

#left1234{
vertical-align:top;
position:absolute;
left:0px;
padding-right:3px;
line-height:18px;
word-break:break-all;
word-wrap:break-word;
}

#right1234{
width:58px;
position:absolute;
right:0px;
}

</style>

<div id= "div ">
<div id= "link "> <b> <a href= "[field:filename/] " > 1234 </a> </b> </div>
<div id= "adiv ">
<div id= "left1234 " class=do> 1234 </div>
<div id= "right1234 " align= "right " class=do> 1234 </div>
</div>
</div>