【问题标题】:Having problems aligning bullets left in Chrome在对齐 Chrome 中留下的项目符号时遇到问题
【发布时间】:2015-03-30 20:44:13
【问题描述】:

我是一名企业主(不是开发人员),他试图通过以下方式修复(看似)随机运行的子弹:

  • 在有序或无序列表的右侧显示项目符号。
  • 在列表右侧显示项目符号,随后的项目符号在左侧正确显示。

问题出现在 Chrome 中。 Firefox 似乎没问题。

我有:

  • 在整个网络和 stackoverflow 中研究了该问题,但未能找到相关的解决方案。
  • 尝试从头开始重建页面。但是,问题仍然存在。
  • 尝试使用 DreamWeaver 和 Expression Web 等拆分设计/代码 Web 开发应用程序进行修复。

然而,尽管我尽最大努力修复,HTML 仍然占主导地位。

我的网站最初是由(表面上)知道自己在做什么的开发人员编写的。所以我正在处理遗留页面和结构。

衷心感谢您的任何帮助。其他非开发者论坛成员可能会从您的回答中受益。

谢谢。

我在下面插入了嵌套的有序/无序列表代码。

<h2>Private Equity Criteria</h2>
<p>To qualify for a Private Equity investment your company needs to:<br/>
	<ol>
		<li><span class="listtext1">Have a viable business model, customers, revenue, and profitability &#8212; with a 
minimum EBITDA of $1M - $3M.</span><ul class="listtext1">
			<li>That means: Neither start-ups nor early stage (pre-revenue) companies qualify for Private Equity.</li>
		</ul>
		</li>
		<li><span class="listtext1">Offer a strategic business opportunity. For example:</span><ul class="listtext1">
			<li>Access to a fast growing niche market.</li>
			<li>Intellectual property in the form of patents, trademarks, and unique technology.</li>
			<li>Access to large, growing, and difficult-to-reach customer segments.</li>
			<li>Or similar benefits.</li>
		</ul>
		</li>
	</ol>
	<h2>Strategic Investors</h2>
	<p>We refer to Strategic Investors as 'Private Equity Lite.' Strategic 
	Investors function much the same way as does a Private Equity group &#8212; with 
	the exception that there is no public investment fund. Strategic Investors 
	invest for themselves. Other than that, Strategic Investors and PEGs have 
	very similar approaches to investing in and growing a company.</p>
	<h2>What Private Equity is NOT</h2>
	<p>Private Equity is not Angel Capital or Venture Capital.</p>
	<ul class="listtext1">
		<li>Angel investors invest in start-up companies, rarely asking for 
		majority control.</li>
		<li>Venture Capital provides capital to early-stage, high-potential, and 
		often high-risk growth companies. Like PEGs, VCs also create investment 
		funds, and also take an equity position in the company, usually after 
		the Series 'A' funding round. Venture Capital is a subset of Private 
		Equity, but not all Private Equity is Venture Capital.</li>
	</ul>

【问题讨论】:

  • 该示例似乎渲染得很好。问题很可能出在 CSS 规则或实际页面上的某些脚本中;没有看到复制问题的示例,几乎没有人可以提供帮助。
  • 我认为您可能缺少随附的 CSS 文件/sn-p 来回答您的问题。 HTML 本身看起来不错,如果您单击“运行代码 sn-p”,您将看到左侧出现所有数字和项目符号
  • 请附上2张图片,1:输出出现在chrome中 2:你想要的输出(你可以用ms字设计,只是为了截图)
  • 感谢您的回复。非常感激。我正在调查每个人的cmets。需要一天左右的时间。

标签: html css


【解决方案1】:

查看actual page,违规项目符号上方的段落应用了float:left 的CSS。

这个CSS可以在文件tvgcss.css中找到

p {
  font-size: 12px;
  font-weight: normal;
  color: #000;
  text-align: left;
  text-decoration: none;
  line-height: 18px;
  float: left;
  width: 100%;
  margin: 0 0 5px 0;
}

删除左浮动位,你应该很好。检查您的网站以确保一切正常。

或者如果您只想影响该页面style="float:none !important;" 添加到列表上方的段落中,如下所示(复制此内容,因为您的错误 - 第一段没有关闭):

<h2>Private Equity Criteria</h2>
<p style="float:none !important;">
    To qualify for a Private Equity investment your company needs to:
</p>
<ol>
    <li>
        <span class="listtext1">
            Have a viable business model, customers, revenue, and profitability &#8212; with a
            minimum EBITDA of $1M - $3M.
        </span><ul class="listtext1">
            <li>That means: Neither start-ups nor early stage (pre-revenue) companies qualify for Private Equity.</li>
        </ul>
    </li>
    <li>
        <span class="listtext1">Offer a strategic business opportunity. For example:</span><ul class="listtext1">
            <li>Access to a fast growing niche market.</li>
            <li>Intellectual property in the form of patents, trademarks, and unique technology.</li>
            <li>Access to large, growing, and difficult-to-reach customer segments.</li>
            <li>Or similar benefits.</li>
        </ul>
    </li>
</ol>
<h2>Strategic Investors</h2>
<p style="float:none !important;">
    We refer to Strategic Investors as 'Private Equity Lite.' Strategic
    Investors function much the same way as does a Private Equity group &#8212; with
    the exception that there is no public investment fund. Strategic Investors
    invest for themselves. Other than that, Strategic Investors and PEGs have
    very similar approaches to investing in and growing a company.
</p>
<h2>What Private Equity is NOT</h2>
<p>Private Equity is not Angel Capital or Venture Capital.</p>
<ul class="listtext1">
    <li>
        Angel investors invest in start-up companies, rarely asking for
        majority control.
    </li>
    <li>
        Venture Capital provides capital to early-stage, high-potential, and
        often high-risk growth companies. Like PEGs, VCs also create investment
        funds, and also take an equity position in the company, usually after
        the Series 'A' funding round. Venture Capital is a subset of Private
        Equity, but not all Private Equity is Venture Capital.
    </li>
</ul>

欢迎来到 StackOverflow :)

【讨论】:

  • 删除浮动的替代方法是使用list-style-position: inside;
  • Ted:您的代码(上面)修复了第一个(有序)列表编号 (1),我已将其上传到我的网站。 www.navocate.com/what_is_private_equity.html 还有一颗子弹从右边飞出,朝底部飞去。 (“天使投资人投资初创公司,很少要求多数控制权。”)请问你看看这个?感谢您对 SO 的欢迎。大家:衷心感谢您的帮助。
  • @KarlBuhl 将此行 &lt;p&gt;Private Equity is not Angel Capital or Venture Capital.&lt;/p&gt; 更改为此 &lt;p style="float:none !important;"&gt;Private Equity is not Angel Capital or Venture Capital.&lt;/p&gt;
  • Ted:如您所知,这行得通。谢谢你。非常感谢您和大家的帮助。有没有可以为非开发人员(比如我)推荐的在线 HTML/CSS 视频学习资源?再次感谢。
猜你喜欢
  • 1970-01-01
  • 2012-12-18
  • 2013-09-17
  • 2017-10-12
  • 2015-01-20
  • 1970-01-01
  • 1970-01-01
  • 2017-11-22
  • 1970-01-01
相关资源
最近更新 更多