2013-11-05 33 views
0

在我的HTML编辑器,在使用HTML编辑器(剑道编辑器)生成子弹我,然后我缩进它来创建子项中,HTML回报是不是在我的预料。如何将Html子元素移出主要元素?

<ul> 
    <li>Focusing on lifetime income replacement 
     <ul><li>Investing in continuous service and innovation</li></ul> 
    </li> 

    <li>Advocating for an improved retirement system</li> 
    <li>Achieving total financial wellness</li> 
    <li>Providing a distinctive, multichannel user experience for participants and plan sponsors </li> 
</ul> 

如您所见,ul标签位于li标签内,它会影响我的报告(我使用itextsharp创建pdf)。

c#如何将ul标签移动到li之外?谁能给我一个解决方案。 我想到的是:

<ul> 
    <li>Focusing on lifetime income replacement 

    </li> 
    <ul> // Move to here 
     <li>Investing in continuous service and innovation</li> 
    </ul> 
    <li>Advocating for an improved retirement system</li> 
    <li>Achieving total financial wellness</li> 
    <li>Providing a distinctive, multichannel user experience for participants and plan sponsors </li> 
</ul> 
+0

我编辑了你的标题。请参阅:“[应该在其标题中包含”标签“](http://meta.stackexchange.com/questions/19190/)”,其中的共识是“不,他们不应该”。 –

回答

0

在你的第一个例子生成的HTML的方式是正确的。

当嵌套列表,每个子列表应该是一个li元素的内部。

See this answer

+0

嗨tarnold86,在我的情况下,我必须转换为这种格式,iTextsharp生成第一种格式的空白....谢谢 –