2014-10-15 1 views
-1

У меня есть следующий page на сайте WordPress, который генерируется кодом внизу этого сообщения. Внутри кода у меня есть набор вложенных списков, которые выделены в этом screenshot красным цветом. Я хотел бы знать CSS, который мне нужен, чтобы удалить разрывы строк, отмеченные на скриншоте синими стрелками. Если вы посмотрите на беспорядок, который я создал в HTML ниже, вы увидите, что мне удалось сделать это в другом месте, используя style="margin: 0em !important; padding: 0em !important; -webkit-margin-after: 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:[email protected]">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> 
+0

Есть ли еще один css для ul li на вашем сайте? –

ответ

-1

Смотри, я вижу свой файл CSS с инспектором Chrome:

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

и ...

media="all" 
dl, menu, ol, ul { 
    margin: 1em 0; 
} 

Редактировать это! Замените значение 1em для своего пользовательского значения (в ems, pixels, whatever ...) и сделайте то же самое для левой прокладки.

Не используйте встроенный стайлинг, это не хорошо. Старайтесь избегать этого и всегда старайтесь использовать внешний CSS, чтобы сделать материал более удобным.

С уважением.

+0

Вы не хотите удалять прокладку. – zgall1

+0

Ну, человек, на всякий случай, я включил его. Маржа и отступы - это интервалы, которые вы обрабатываете в этих списках. Что с тобой человек ... –

-1

Оказывается, это было намного проще, чем я думал. Мне просто нужно было установить ul{ margin:0;}. Все ответы, предлагающие установку нулевого нуля, похоже, не понимают, как работают списки.

+0

Это то, что я положил на свой ответ. И я не могу поверить, что вы говорите это, если вы тот, который, кажется, не понимает основ в первую очередь. Этот вопрос должен быть спамом. –

+0

Мне нравится, что вы сказали, что вы ответили в ответ на свой ответ, когда ваш ответ, который находится непосредственно над моей, также включает настройку заполнения на ноль. Разве вы не понимаете, что установка прогона в ноль нарушает всю функциональность списка? – zgall1

+0

Я никогда этого не говорил, мужик. –

Смежные вопросы