Html 自定义列表样式以减少行后的空间

Html 自定义列表样式以减少行后的空间,html,css,list,padding,Html,Css,List,Padding,我在WordPress网站上有以下内容,该网站由本文底部的代码生成。在代码中,我有一组嵌套的列表,这些列表以红色突出显示。我想知道我需要使用CSS来删除屏幕截图中蓝色箭头标记的换行符。如果您查看我在下面的HTML中创建的混乱,您将看到我在其他地方使用style=“margin:0em!important;padding:0em!important;-webkit margin:0em!important;”实现了这一点,但这在列表中不起作用 HTML <h2 class="p1" styl

我在WordPress网站上有以下内容,该网站由本文底部的代码生成。在代码中,我有一组嵌套的列表,这些列表以红色突出显示。我想知道我需要使用CSS来删除屏幕截图中蓝色箭头标记的换行符。如果您查看我在下面的HTML中创建的混乱,您将看到我在其他地方使用
style=“margin:0em!important;padding:0em!important;-webkit margin:0em!important;”
实现了这一点,但这在列表中不起作用

HTML

<h2 class="p1" style="text-align: center;">Register now!</h2>
<p class="p1"><strong>Register by December 31, 2014 and take advantage of our early bird offer and save!
</strong></p>
<p class="p1" style="text-align: center;"><strong><span style="color: #ff0000;">Registration includes two breakfasts, two
lunches, two end-of-day receptions, and free parking.</span>
</strong></p>
<p style="margin: 0em !important; padding: 0em !important; -webkit-margin-after: 0em !important;"><strong>Special offer for small and medium size enterprises and private equity firms:</strong></p>
<p style="font-size: 16px; -webkit-margin-before: 0em !important;">We are offering special, reduced registration rates for senior executives of qualifying small and medium size enterprises (SMEs) and for those in private equity.*</p>
<p style="font-size: 16px;">Register and pay by December 31, 2014 and save $400 for the first attendee and over $1,000 for three attendees from the same qualifying SME or private equity firm, by taking advantage of the following early bird rates:</p>
<p style="font-size: 16px; -webkit-margin-after: 0em !important;"><strong>One or more attendees from the same qualifying SME or private equity firm:</strong>
[table id=1 /]</p>
<p class="p1" style="font-size: 16px;">*To qualify for the special rate, you must be:</p>

<ul style="font-size: 16px;">
    <li>an owner, CEO, CFO, head of sales and marketing, or other senior executive at a business that:
        <ul>
            <li>Has fewer than 500 employees;</li>
            <li>Is headquartered in Canada; and</li>
            <li>Is not:
                <ul>
                    <li>in the business of offering legal, accounting, financial, consulting, brokerage, marketing, information technology, recruitment, logistics or other services to Canadian companies, related to trade and investment with the United States; or</li>
                    <li>a government entity</li>
                </ul>
            </li>
        </ul>
    </li>
</ul>
<p style="font-size: 16px;">or:</p>

<ul style="font-size: 16px;">
    <li>a partner, managing director, vice president, or principal at a private equity firm, or a qualified investor.</li>
</ul>
<p style="margin: 0em !important; padding: 0em !important; -webkit-margin-after: 0em !important;"><strong>All other attendees can save $400, too, by registering now!
</strong></p>
[table id=2 /]
<p style="font-size: 14px;"><span style="font-weight: bold;">Cancellation Policies:</span> Should you be unable to attend this event, we require notice in writing on or before March 2, 2015 at 5:00pm, ET. Cancellations made after this date will not be eligible for a refund. All cancellations are subject to an administration fee equal to 50% of the invoiced purchase price.</p>
<p style="font-size: 14px;">Your registration may also be transferred to another individual at the same company at no charge. Should you wish to transfer your registration to another person, please inform us by <a href="mailto:customersupport@bivioevents.com">email</a>, a minimum of 24 hours prior to the event. Please be sure to include the following details: Name and Title of Attendee taking your spot, Company, Company Address, Direct Phone Number, Email Address, Name on Badge, and Company Name on Badge. In lieu of cancellation or transfer to another person at the same company, you may request a full credit for the amount paid to be applied to a future event, produced by Bivio Events Inc.</p>
<p style="font-size: 14px;">If for any reason whatsoever the conference is cancelled, the liability of Bivio Events Inc. shall be limited to reimbursement of the conference fees. Producer reserves the right, with reasonable notice, to make reasonable changes to program dates and venues and assumes no liability for the changes.</p>
<p style="font-size: 14px;"><b>Use of electronic recording devices: </b>Please note that the use of any electronic recording device of any kind is strictly prohibited during sessions.</p>
立即注册!

在2014年12月31日前注册,并利用我们的早起优惠和优惠!

登记包括两份早餐,两份早餐 午餐、两次日后招待会和免费停车。

针对中小企业和私募股权公司的特别优惠:

我们为符合条件的中小企业(SME)和私募股权公司的高级管理人员提供特别的、降低的注册率*

在2014年12月31日之前注册并付款,通过利用以下提前付款率,第一位与会者可节省400美元,同一合格中小企业或私募股权公司的三位与会者可节省1000美元以上:

来自同一合格中小企业或私募股权公司的一名或多名与会者: [表id=1/]

*要享受特价,您必须:

  • 公司的所有者、首席执行官、首席财务官、销售和营销主管或其他高级管理人员:
    • 员工不足500人
    • 总部设在加拿大;及
    • 不是:
      • 向加拿大公司提供与美国贸易和投资相关的法律、会计、财务、咨询、经纪、营销、信息技术、招聘、物流或其他服务;或
      • 政府实体
或:

  • 私人股本公司的合伙人、常务董事、副总裁或负责人,或合格投资者

所有其他与会者现在注册也可以节省400美元!

[表id=2/] 取消政策:如果您无法参加本次活动,我们要求您在2015年3月2日下午5:00(美国东部时间)或之前发出书面通知。在该日期之后取消的活动将无法获得退款。所有取消均需缴纳相当于发票购买价格50%的管理费

您的注册也可以免费转让给同一公司的另一个人。如果您希望将您的注册转移给其他人,请在活动前至少24小时通知我们。请务必包括以下详细信息:参加会议人员的姓名和职务、公司、公司地址、直接电话号码、电子邮件地址、徽章上的姓名以及徽章上的公司名称。代替取消或转让给同一公司的另一人,您可以要求全额贷记由Bivio Events Inc.制作的用于未来活动的已付金额

如果由于任何原因取消会议,Bivio Events Inc.的责任应限于偿还会议费用。制作人保留在合理通知的情况下对节目日期和地点进行合理更改的权利,并且不对更改承担任何责任

使用电子录音设备:请注意,在会议期间严禁使用任何类型的电子录音设备


看,我看到了你的CSS文件和Chrome inspector:

media="all"
menu, ol, ul {
  padding: 0 0 0 40px;
}
而且

media="all"
dl, menu, ol, ul {
  margin: 1em 0;
}
编辑它!将1em值替换为自定义值(以ems、像素等为单位),并对左侧填充执行相同操作

不要使用内联样式,这不好。尽量避免使用外部CSS,使内容更易于维护


亲切的问候。

事实证明,这比我想象的要容易得多。我只是需要设置
ul{margin:0;}
。所有建议将填充设置为零的答案似乎都不理解列表是如何工作的

你的网站上还有其他ul li的css吗?你不想删除填充。好吧,老兄,以防万一,我包括了它。边距和填充是您在这些列表上处理的间距。你怎么了,伙计…这是我在答案上写的。如果你是一开始似乎不懂基本原理的人,我简直不敢相信你会这么说。这个问题应该是垃圾邮件。我喜欢你说你把这个答案放在你的答案中,而你的答案,就在我的答案之上,也包括将填充设置为零。您没有意识到将填充设置为零会破坏列表的整个功能吗?