<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>等待-放飞梦想 &#187; 居中</title>
	<atom:link href="http://leotheme.cn/tag/%e5%b1%85%e4%b8%ad/feed" rel="self" type="application/rss+xml" />
	<link>http://leotheme.cn</link>
	<description>勤现在-乐将来</description>
	<lastBuildDate>Mon, 21 May 2012 09:45:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>未知宽度容器的居中解决方案</title>
		<link>http://leotheme.cn/javascript/dom-float-center.html</link>
		<comments>http://leotheme.cn/javascript/dom-float-center.html#comments</comments>
		<pubDate>Thu, 17 Feb 2011 02:27:36 +0000</pubDate>
		<dc:creator>Await</dc:creator>
				<category><![CDATA[前端交互]]></category>
		<category><![CDATA[居中]]></category>
		<category><![CDATA[未知宽度]]></category>
		<category><![CDATA[浮动]]></category>

		<guid isPermaLink="false">http://leotheme.cn/?p=870</guid>
		<description><![CDATA[如上图所示的分页，其结构如下： &#60;div class=&#34;pagenavi&#34;&#62; &#160; &#160; &#60;ul&#62; &#160; &#160; &#160; &#160; &#60;li&#62;&#60;a&#160;href=&#34;&#34; title=&#34;&#34;&#62;1/18&#60;/a&#62;&#60;/li&#62; &#160; &#160; &#160; &#160; &#60;li&#62;&#60;a&#160;href=&#34;&#34; title=&#34;&#34;&#62;上一页&#60;/a&#62;&#60;/li&#62; &#160; &#160; &#160; &#160; &#60;li&#160;class=&#34;current&#34;&#62;&#60;a href=&#34;&#34; title=&#34;&#34;&#62;1&#60;/a&#62;&#60;/li&#62; &#160; &#160; &#160; &#160; &#60;li&#62;&#60;a&#160;href=&#34;&#34; title=&#34;&#34;&#62;2&#60;/a&#62;&#60;/li&#62; &#160; &#160; &#160; &#160; &#60;li&#62;&#60;a&#160;href=&#34;&#34; title=&#34;&#34;&#62;3&#60;/a&#62;&#60;/li&#62; &#160; &#160; &#160; &#160; &#60;li&#62;&#60;a&#160;href=&#34;&#34; title=&#34;&#34;&#62;...&#60;/a&#62;&#60;/li&#62; &#160; &#160; &#160; &#160; &#60;li&#62;&#60;a&#160;href=&#34;&#34; title=&#34;&#34;&#62;18&#60;/a&#62;&#60;/li&#62; &#160; &#160; &#160; &#160; &#60;li&#62;&#60;a&#160;href=&#34;&#34; title=&#34;&#34;&#62;下一页&#60;/a&#62;&#60;/li&#62; [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="解决wordpress分页问题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fdom-float-center.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">解决wordpress分页问题</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="IE下中英文字体不能对齐原因及解决" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fiexiazywbunenduiji.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fdom-float-center.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">IE下中英文字体不能对齐原因及解决</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="给网站整了一个小小的ICO了" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fothes%2Fblog-png-ico.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fdom-float-center.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6196962.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">给网站整了一个小小的ICO了</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="利用WP自带的JS库打造超酷的侧边栏" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressjs-jqueryone.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fdom-float-center.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/08/25/2754531.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">利用WP自带的JS库打造超酷的侧边栏</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="CSS处理斜角导航条的一个例子" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fcsschulixiejiaonav.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fdom-float-center.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/23/6202112.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">CSS处理斜角导航条的一个例子</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p><a href="http://leotheme.cn/javascript/dom-float-center.html/attachment/qq%e6%88%aa%e5%9b%be%e6%9c%aa%e5%91%bd%e5%90%8d" rel="attachment wp-att-871"><img src="http://leotheme.cn/wp-content/uploads/2011/02/QQ截图未命名.jpg" alt="分页图片" title="分页" width="358" height="54" class="alignnone size-full wp-image-871" /></a><br />
如上图所示的分页，其结构如下：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Olive;">&lt;</span><span style="color: Green;">div</span><span style="color: Gray;"> </span><span style="color: #00008b;">class</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">pagenavi</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">&lt;</span><span style="color: Green;">ul</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">&lt;</span><span style="color: Green;">li</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">a</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">href</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">title</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;">1/18</span><span style="color: Olive;">&lt;/</span><span style="color: Green;">a</span><span style="color: Olive;">&gt;&lt;/</span><span style="color: Green;">li</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">&lt;</span><span style="color: Green;">li</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">a</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">href</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">title</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;">上一页</span><span style="color: Olive;">&lt;/</span><span style="color: Green;">a</span><span style="color: Olive;">&gt;&lt;/</span><span style="color: Green;">li</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">&lt;</span><span style="color: Green;">li</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">class</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">current</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">a</span><span style="color: Gray;"> </span><span style="color: #00008b;">href</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">title</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;">1</span><span style="color: Olive;">&lt;/</span><span style="color: Green;">a</span><span style="color: Olive;">&gt;&lt;/</span><span style="color: Green;">li</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">&lt;</span><span style="color: Green;">li</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">a</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">href</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">title</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;">2</span><span style="color: Olive;">&lt;/</span><span style="color: Green;">a</span><span style="color: Olive;">&gt;&lt;/</span><span style="color: Green;">li</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">&lt;</span><span style="color: Green;">li</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">a</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">href</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">title</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;">3</span><span style="color: Olive;">&lt;/</span><span style="color: Green;">a</span><span style="color: Olive;">&gt;&lt;/</span><span style="color: Green;">li</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">&lt;</span><span style="color: Green;">li</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">a</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">href</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">title</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;">...</span><span style="color: Olive;">&lt;/</span><span style="color: Green;">a</span><span style="color: Olive;">&gt;&lt;/</span><span style="color: Green;">li</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">&lt;</span><span style="color: Green;">li</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">a</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">href</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">title</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;">18</span><span style="color: Olive;">&lt;/</span><span style="color: Green;">a</span><span style="color: Olive;">&gt;&lt;/</span><span style="color: Green;">li</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">&lt;</span><span style="color: Green;">li</span><span style="color: Olive;">&gt;&lt;</span><span style="color: Green;">a</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">href</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">title</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Olive;">&gt;</span><span style="color: Gray;">下一页</span><span style="color: Olive;">&lt;/</span><span style="color: Green;">a</span><span style="color: Olive;">&gt;&lt;/</span><span style="color: Green;">li</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">&lt;/</span><span style="color: Green;">ul</span><span style="color: Olive;">&gt;</span></li>
<li><span style="color: Olive;">&lt;/</span><span style="color: Green;">div</span><span style="color: Olive;">&gt;</span></li></ol></div>
<p><span id="more-870"></span><br />
在这个结构中，“.pagenavi”是外部框架，100%宽度。而目的，是为了让“.pagenavi”下的“ul”块能够居中显示。可是因为“ul”块中的节点“li”并不固定且为块元素，所以无法确认其父层最终宽度。我们知道一般情况下要让元素居中，直接给宽度和“margin: 0 auto”就行了。但在这里无法确定其宽度，所以这时这种方法就行不通了。</p>
<p><strong>解决方案一：相对浮动</strong></p>
<p>“.pagenavi ul” 向左浮动50%，是以外层“.pagenavi”的宽度为标准的；子节点“li”向右浮动50%，是以层“ul”的宽度为标准的，这里无需定义内层的宽度。这样算是一个小技巧，让“ul”居中了。也补足了float没有center属性的缺陷。</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Blue;">.pagenavi</span><span style="color: Gray;"> </span><span style="color: Blue;">ul</span><span style="color: Olive;">{</span><span style="color: Gray;"> </span><span style="color: Green;">float:</span><span style="color: Gray;"> </span><span style="color: Red;">left</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">left:</span><span style="color: Gray;">&nbsp;</span><span style="color: Maroon;">50</span><span style="color: Red;">%</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">position:</span><span style="color: Gray;">&nbsp;</span><span style="color: Red;">relative</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">.pagenavi</span><span style="color: Gray;"> </span><span style="color: Blue;">li</span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">float:</span><span style="color: Gray;">&nbsp;</span><span style="color: Red;">left</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">position:</span><span style="color: Gray;">&nbsp;</span><span style="color: Red;">relative</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">right:</span><span style="color: Gray;">&nbsp;</span><span style="color: Maroon;">50</span><span style="color: Red;">%</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">}</span></li></ol></div>
<p><strong>解决方案二：display:inline-block</strong></p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Blue;">.pagenavi</span><span style="color: Gray;"> </span><span style="color: Blue;">li</span><span style="color: Olive;">{</span></li>
<li><span style="color: Green;">display:</span><span style="color: Red;">inline-block</span><span style="color: Gray;">;</span></li>
<li><span style="color: Blue;">*</span><span style="color: Green;">display:</span><span style="color: Red;">inline</span><span style="color: Gray;">;</span></li>
<li><span style="color: Blue;">*</span><span style="color: Green;">zoom:</span><span style="color: Maroon;">1</span><span style="color: Gray;">;</span></li>
<li><span style="color: Green;">vertical-align:</span><span style="color: Red;">top</span><span style="color: Gray;">;</span></li>
<li><span style="color: Olive;">}</span><span style="color: Blue;">*</span><span style="color: Gray;">/</span></li></ol></div>
<p>详细的请点击下面的链接：</p>
<p><a href="http://leotheme.cn/wp-content/uploads/Example/css/dom-float-center.html">未知宽度容器的居中解决方案</a></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="解决wordpress分页问题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fdom-float-center.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">解决wordpress分页问题</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="IE下中英文字体不能对齐原因及解决" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fiexiazywbunenduiji.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fdom-float-center.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">IE下中英文字体不能对齐原因及解决</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="CSS 3.0 参考手册 (中文版)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fcss-3-0-chm.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fdom-float-center.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197221.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">CSS 3.0 参考手册 (中文版)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="寻找Photoshop笔刷的15个好去处" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fshare%2F15-photoshop-brush-web.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fdom-float-center.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197124.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">寻找Photoshop笔刷的15个好去处</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Opera中国版“朱雀”正式发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fnews%2Fopera-china-96.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fdom-float-center.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197076.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Opera中国版“朱雀”正式发布</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li>2008-11-25 -- <a href="http://leotheme.cn/javascript/css-clear-float-fangfa.html" title="CSS清除浮动的一些方法">CSS清除浮动的一些方法</a> (6)<br /><small>CSS的浮动为我们的布局带来了很大的好处，利用浮动我们可以很方便的写出各种版式。但浮动同时也带来很多问题；这些问题基本上都因为没有及时的或者在适当的位置清楚浮动。下面来说下常用的清除浮动方法：

...</small></li><li>2008-08-21 -- <a href="http://leotheme.cn/javascript/divmargin0autotext-align.html" title="DIV水平居中的方法小结">DIV水平居中的方法小结</a> (0)<br /><small>我想这个是我们经常遇到的一个问题，当然对很多人来说，这是个很简单，很容易解决的问，在这里我只是把这些常用的方总结下。
一、margin:auto 0 与 text-aligh:center
这个方...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://leotheme.cn/javascript/dom-float-center.html/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>DIV水平居中的方法小结</title>
		<link>http://leotheme.cn/javascript/divmargin0autotext-align.html</link>
		<comments>http://leotheme.cn/javascript/divmargin0autotext-align.html#comments</comments>
		<pubDate>Thu, 21 Aug 2008 12:48:40 +0000</pubDate>
		<dc:creator>Await</dc:creator>
				<category><![CDATA[前端交互]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[居中]]></category>

		<guid isPermaLink="false">http://leotheme.cn/?p=37</guid>
		<description><![CDATA[我想这个是我们经常遇到的一个问题，当然对很多人来说，这是个很简单，很容易解决的问，在这里我只是把这些常用的方总结下。 一、margin:auto 0 与 text-aligh:center 这个方法我想是大部分人在用的，也是最简单的。我们先设定marign: 0 auto，即上下边距为0，左右为自动，这样在IE7、Firefox、Opera等浏览器中就能实现居中了。 div#wrap {&#160;width:760px;&#160;margin:0 auto;&#160;border:1px solid #666;&#160;background-color:#eee; 但这在IE6中是不起作用的，在IE6中我们得用text-align:center.在IE中text-align属性是可继承的，即在父元素中设置后在子元素中就默认具有了该属性。因此我们可以在body标签中设置text-align属性值为center，这样页面内所有的元素都会自动居中.现在我们修改下代码如下: body { text-align:center; }&#160; div#wrap {&#160;text-align:left;&#160;width:760px;&#160;margin:0 auto;&#160;border:1px solid #666;&#160;background-color:#eee;&#160; } 二:对wrap进行相对定位，然后使用负边距抵消偏移量。 这种方法我想用的人比较少，但这也是一个简单又有效的方法。 我们设置wrap的定位是相对于其父元素body标签的，然后将其左边框移动到页面的正中间（也就是left:50%含意）；最后我们再从中间位置向左偏移回一半的距离来，这样就实现了水平居中了。 div#wrap {&#160;position:relative;&#160;width:760px;&#160;left:50%;&#160;margin-left:-380px;&#160;border:1px solid #666;&#160;background-color:#eee;&#160; } 三、其它的居中方式 body {&#160;padding:10px 150px;&#160; }&#160; div#wrap {&#160;border:1px solid #666;&#160;background-color:#eee;&#160; } 相关文章2011-09-24 -- 使用lesscss来编码编写css (12)lesscss 是动态的样式表语言，他让css增加变量，组合，函数，运算等语法。这个项目的网站在国内访问不到，大家都懂的。 lesscss使用方法有两种： 页面添加一个 less.js的文...2011-02-17 -- 未知宽度容器的居中解决方案 (13) 如上图所示的分页，其结构如下： 1/18 [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="黑莓主题的改版总算完成了" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fberrytimes-themes.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fdivmargin0autotext-align.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6196917.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">黑莓主题的改版总算完成了</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="一个简单的网页调色板" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fonewebcolorban.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fdivmargin0autotext-align.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6200580.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">一个简单的网页调色板</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Flash CS4 细节" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fnews%2Fflash-cs4.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fdivmargin0autotext-align.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197102.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Flash CS4 细节</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="CSS 3.0 参考手册 (中文版)" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fcss-3-0-chm.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fdivmargin0autotext-align.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197221.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">CSS 3.0 参考手册 (中文版)</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="寻找Photoshop笔刷的15个好去处" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fshare%2F15-photoshop-brush-web.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fdivmargin0autotext-align.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197124.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">寻找Photoshop笔刷的15个好去处</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>我想这个是我们经常遇到的一个问题，当然对很多人来说，这是个很简单，很容易解决的问，在这里我只是把这些常用的方总结下。<br />
一、margin:auto 0 与 text-aligh:center<br />
这个方法我想是大部分人在用的，也是最简单的。我们先设定marign: 0 auto，即上下边距为0，左右为自动，这样在IE7、Firefox、Opera等浏览器中就能实现居中了。<br />
<span id="more-37"></span></p>
<div class="hl-surround"><div class="hl-main"><span style="color: Blue;">div#wrap</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"><br />&nbsp;</span><span style="color: Green;">width:</span><span style="color: Maroon;">760</span><span style="color: Red;">px</span><span style="color: Green;"></span><span style="color: Gray;">;<br />&nbsp;</span><span style="color: Green;">margin:</span><span style="color: Maroon;">0</span><span style="color: Gray;"> </span><span style="color: Red;">auto</span><span style="color: Green;"></span><span style="color: Gray;">;<br />&nbsp;</span><span style="color: Green;">border:</span><span style="color: Maroon;">1</span><span style="color: Red;">px</span><span style="color: Gray;"> </span><span style="color: Red;">solid</span><span style="color: Gray;"> </span><span style="color: #00008b;">#666</span><span style="color: Green;"></span><span style="color: Gray;">;<br />&nbsp;</span><span style="color: Green;">background-color:</span><span style="color: #00008b;">#eee</span><span style="color: Green;"></span><span style="color: Gray;">;</span></div></div>
<p>但这在IE6中是不起作用的，在IE6中我们得用text-align:center.在IE中text-align属性是可继承的，即在父元素中设置后在子元素中就默认具有了该属性。因此我们可以在body标签中设置text-align属性值为center，这样页面内所有的元素都会自动居中.现在我们修改下代码如下:</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Blue;">body</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"> </span><span style="color: Green;">text-align:</span><span style="color: Red;">center</span><span style="color: Green;"></span><span style="color: Gray;">; </span><span style="color: Olive;">}</span><span style="color: Gray;"><br />&nbsp; </span><span style="color: Blue;">div#wrap</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"><br />&nbsp;</span><span style="color: Green;">text-align:</span><span style="color: Red;">left</span><span style="color: Green;"></span><span style="color: Gray;">;<br />&nbsp;</span><span style="color: Green;">width:</span><span style="color: Maroon;">760</span><span style="color: Red;">px</span><span style="color: Green;"></span><span style="color: Gray;">;<br />&nbsp;</span><span style="color: Green;">margin:</span><span style="color: Maroon;">0</span><span style="color: Gray;"> </span><span style="color: Red;">auto</span><span style="color: Green;"></span><span style="color: Gray;">;<br />&nbsp;</span><span style="color: Green;">border:</span><span style="color: Maroon;">1</span><span style="color: Red;">px</span><span style="color: Gray;"> </span><span style="color: Red;">solid</span><span style="color: Gray;"> </span><span style="color: #00008b;">#666</span><span style="color: Green;"></span><span style="color: Gray;">;<br />&nbsp;</span><span style="color: Green;">background-color:</span><span style="color: #00008b;">#eee</span><span style="color: Green;"></span><span style="color: Gray;">;<br />&nbsp; </span><span style="color: Olive;">}</span></div></div>
<p>二:对wrap进行相对定位，然后使用负边距抵消偏移量。<br />
这种方法我想用的人比较少，但这也是一个简单又有效的方法。<br />
我们设置wrap的定位是相对于其父元素body标签的，然后将其左边框移动到页面的正中间（也就是left:50%含意）；最后我们再从中间位置向左偏移回一半的距离来，这样就实现了水平居中了。</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Blue;">div#wrap</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"><br />&nbsp;</span><span style="color: Green;">position:</span><span style="color: Red;">relative</span><span style="color: Green;"></span><span style="color: Gray;">;<br />&nbsp;</span><span style="color: Green;">width:</span><span style="color: Maroon;">760</span><span style="color: Red;">px</span><span style="color: Green;"></span><span style="color: Gray;">;<br />&nbsp;</span><span style="color: Green;">left:</span><span style="color: Maroon;">50</span><span style="color: Red;">%</span><span style="color: Green;"></span><span style="color: Gray;">;<br />&nbsp;</span><span style="color: Green;">margin-left:</span><span style="color: Gray;">-</span><span style="color: Maroon;">380</span><span style="color: Red;">px</span><span style="color: Green;"></span><span style="color: Gray;">;<br />&nbsp;</span><span style="color: Green;">border:</span><span style="color: Maroon;">1</span><span style="color: Red;">px</span><span style="color: Gray;"> </span><span style="color: Red;">solid</span><span style="color: Gray;"> </span><span style="color: #00008b;">#666</span><span style="color: Green;"></span><span style="color: Gray;">;<br />&nbsp;</span><span style="color: Green;">background-color:</span><span style="color: #00008b;">#eee</span><span style="color: Green;"></span><span style="color: Gray;">;<br />&nbsp; </span><span style="color: Olive;">}</span></div></div>
<p>三、其它的居中方式</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Blue;">body</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"><br />&nbsp;</span><span style="color: Green;">padding:</span><span style="color: Maroon;">10</span><span style="color: Red;">px</span><span style="color: Gray;"> </span><span style="color: Maroon;">150</span><span style="color: Red;">px</span><span style="color: Green;"></span><span style="color: Gray;">;<br />&nbsp; </span><span style="color: Olive;">}</span><span style="color: Gray;"><br />&nbsp; </span><span style="color: Blue;">div#wrap</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"><br />&nbsp;</span><span style="color: Green;">border:</span><span style="color: Maroon;">1</span><span style="color: Red;">px</span><span style="color: Gray;"> </span><span style="color: Red;">solid</span><span style="color: Gray;"> </span><span style="color: #00008b;">#666</span><span style="color: Green;"></span><span style="color: Gray;">;<br />&nbsp;</span><span style="color: Green;">background-color:</span><span style="color: #00008b;">#eee</span><span style="color: Green;"></span><span style="color: Gray;">;<br />&nbsp; </span><span style="color: Olive;">}</span></div></div>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="Opera中国版“朱雀”正式发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fnews%2Fopera-china-96.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fdivmargin0autotext-align.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197076.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Opera中国版“朱雀”正式发布</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="推荐一个可爱的字体——方正喵呜体" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fshare%2Ffz_fontmw.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fdivmargin0autotext-align.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197351.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">推荐一个可爱的字体——方正喵呜体</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题：perfct 1.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fdivmargin0autotext-align.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/22/33021700.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="用jquery写一个简单的菜单伸缩效果" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fjquery-for-nav-slide.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fdivmargin0autotext-align.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197279.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">用jquery写一个简单的菜单伸缩效果</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="功能强大的FLASH Galleryd——dfGallery 2.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fshare%2Fflash-galleryd-dfgallery-20.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fdivmargin0autotext-align.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197154.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">功能强大的FLASH Galleryd——dfGallery 2.0</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li>2011-09-24 -- <a href="http://leotheme.cn/javascript/use-lesscss-edit-css.html" title="使用lesscss来编码编写css">使用lesscss来编码编写css</a> (12)<br /><small>lesscss 是动态的样式表语言，他让css增加变量，组合，函数，运算等语法。这个项目的网站在国内访问不到，大家都懂的。

lesscss使用方法有两种：

页面添加一个 less.js的文...</small></li><li>2011-02-17 -- <a href="http://leotheme.cn/javascript/dom-float-center.html" title="未知宽度容器的居中解决方案">未知宽度容器的居中解决方案</a> (13)<br /><small>
如上图所示的分页，其结构如下：


	
		1/18
		上一页
		1
		2
		3
		...
		18
		下一页
	



在这个结构中，“.pagena...</small></li><li>2009-11-11 -- <a href="http://leotheme.cn/javascript/css-to-realize-accordant.html" title="左右两栏等高实现方法">左右两栏等高实现方法</a> (6)<br /><small>等高布局在实际的应用中会经常用到。最常见的是左边的内容很多。而右边的内容却很少。为了不让右边出现太多的空白，有时需要让右边的高度和左边的保持一致。实现的方法有很多，以前一般是用背景填充来模拟。虽然很简...</small></li><li>2009-08-30 -- <a href="http://leotheme.cn/javascript/css-3-0-chm.html" title="CSS 3.0 参考手册 (中文版)">CSS 3.0 参考手册 (中文版)</a> (9)<br /><small>作为一个Web开发者，保持对未来Web标准的关注、学习和了解是很重要的。不管你是第一次准备去认识CSS3，还是已经略知皮毛，这个来自腾讯的webteam发布的CSS 3.0 参考手册 (中文版)将有助...</small></li><li>2009-07-07 -- <a href="http://leotheme.cn/javascript/nuheshienide-css-gengyiyuedui.html" title="如何使你的CSS样式更易阅读?">如何使你的CSS样式更易阅读?</a> (15)<br /><small>在做wordpress主题的时候，样式是最重要的一部分。作为主题的制作者，我们不但要考滤页面的还原完整度，还要一个重要的就是要让CSS阅读起来很容易。因为不管我们怎么尽力去做到完美，但每个人都想主题更...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://leotheme.cn/javascript/divmargin0autotext-align.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

