【问题标题】:UL List is Indenting the first list itemUL List 正在缩进第一个列表项
【发布时间】:2014-05-29 06:28:36
【问题描述】:

我正在开发一个 Magento 1.9.x 网站和产品描述,但由于一些非常奇怪的原因,第一个项目符号比列表的其余部分多缩进一个。

这是我在“列表”视图中用于第一个产品的代码:

<p>The ERGL24054D-4000K upgrades your existing linear 2x4 fixtures in less than 10 minutes. Correlated color temperature (CCT) is 4000K. Deliver 5400 lumens of light and over 100 lumens per watt at the system level. MADE IN THE USA.</p>
<p><strong>Kit includes:</strong></p>
<ul>
<li>ERG Lighting dimmable LED driver</li>
<li>(2-4) LED light engine sticks</li>
<li>(8) Self-drilling screws</li>
<li>Wire nuts</li>
<li>Installation instructions</li>
<li>Opalescent film (optional)</li>
<li>Opalescent lens (optional)</li>
<li>Prismatic diffusers (optional)</li>
<li>Nea beam-shaping isotropic lens (optional)</li>
</ul>

你可以在这里看到最终结果:

http://www.erglighting.com/index.php/retrofit-kits.html?mode=list

请注意,列表中的所有产品都会发生这种情况。谁能告诉我会导致这个问题的原因以及我能做些什么来解决它?谢谢!

我找到了这篇文章,但不确定这是否能解决问题,或者这是否适用于 1.9:

http://www.magentocommerce.com/wiki/4_-_themes_and_template_customization/css/unordered_list_work_correctly

我也发现了这个问题,但它似乎是针对 1.4 版本的:

http://www.magentocommerce.com/boards/viewthread/45667/

【问题讨论】:

标签: html css magento magento-1.9


【解决方案1】:

第一个列表项在其上方的&lt;p&gt; 周围浮动。从&lt;p&gt; 中删除浮动或在&lt;li&gt; 上清除它...

.products-list .desc > p{
 float:left /* remove this */
}

.products-list li:first-child{
  padding-top:20px;
  clear:left; /* add this */
}

【讨论】:

  • 我会这样清除它吗? .products-list .desc > p{ float:left; p.clear;}
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-03-08
  • 2019-03-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多