下面是我的HTML代码,我需要你的帮助来解决两个问题,
table,并使它没有表。运行代码:http://jsfiddle.net/samansari/ppu6T/
XML数据:
$(function() {
$.ajax({
type: "POST",
url: "/echo/xml/",
dataType: "xml",
data: {
xml: "<data caption='Start Processes'><heading caption='Customer Registration'><info caption='Credit note approval' desc='Credit Note request form and approval process.'/></heading><heading caption='Installation'><info caption='Credit note approval' desc='Credit Note request form and approval process..'/><info caption='Credit And Rebill Note (smartforms)' desc='Generate and Process a Letter of Guarantee for the customer.'/></heading></data>>"
},
success: function(xml) {
console.log(xml);
}
});
});HTML代码:
<div id="navcontainer">
<ul>
<li>
<div class="gtpointer"><span>    Start Processes</span> </div>
<ul>
<li>
<span> <span class="gtpointer">Customer Registration</span> </span>
<ul>
<li>
<span>
<table width="100%" border="0">
<tr>
<td width="30%">
<span class="landingSubmenu"><a href="#">Credit note approval</a></span>
</td>
<td>
<span >Credit Note request form and approval process.</span>
</td>
</tr>
</table>
</span>
</li>
</ul>
</li>
<li>
<span> <span class="gtpointer">Installation</span> </span>
<ul>
<li>
<span>
<table width="100%" border="0">
<tr>
<td width="30%">
<span class="landingSubmenu"><a href="#">Credit note approval</a></span>
</td>
<td>
<span >Credit Note request form and approval process.</span>
</td>
</tr>
</table>
</span>
</li>
<li>
<span>
<table width="100%" border="0">
<tr>
<td width="30%">
<span class="landingSubmenu"><a href="#">Credit And Rebill Note (smartforms)</a></span>
</td>
<td>
<span >Generate and Process a Letter of Guarantee for the customer.</span>
</td>
</tr>
</table>
</span>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>多亏了所有人。
发布于 2012-10-18 09:20:38
对于第一个问题:只需使用内联块显示的DIVs代替TDs,并删除表和TRs。然后为两个DIVs设置宽度百分比,并将垂直对齐设置为中间,以模拟TDs:
http://jsfiddle.net/bQbzK/
HTML
<div id="navcontainer">
<ul>
<li>
<div class="gtpointer">
<span>    Start Processes</span>
</div>
<ul>
<li>
<span>
<span class="gtpointer">Customer Registration</span>
</span>
<ul>
<li>
<span>
<div class="col1">
<span class="landingSubmenu">
<a href="#">Credit note approval</a>
</span>
</div>
<div class="col2">
<span >
Credit Note request form and approval process.
</span>
</div>
</span>
</li>
</ul>
</li>
<li>
<span>
<span class="gtpointer">Installation</span>
</span>
<ul>
<li>
<span>
<div class="col1">
<span class="landingSubmenu">
<a href="#">Credit note approval</a>
</span>
</div>
<div class="col2">
<span >
Credit Note request form and approval process.
</span>
</div>
</span>
</li>
<li>
<span>
<div class="col1">
<span class="landingSubmenu">
<a href="#">
Credit And Rebill Note (smartforms)
</a>
</span>
</div>
<div class="col2">
<span>
Generate and Process a Letter of
Guarantee for the customer.
</span>
</div>
</span>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>CSS:
div{
display: inline-block;
vertical-align: middle;
}
.col1{
width: 30%;
}
.col2{
width: 69%;
}https://stackoverflow.com/questions/12950955
复制相似问题