How to Suppress Spacing Between Paragraphs of the Same CSS Class

Remove spacing between p

That space isn't between the paragraphs. that's the space given to the characters themselves. Type has white space around it (partially to accommodate ascenders and descenders).

If you want to remove the space between the lines of text themselves, then you need to put the text into the same paragraph, and adjust the line height.

But even then, note that you'll never get this exact, as every typeface and font is going to have different metrics, and you won't always know what exact font will be shown on the end-user's screen. Using a web font will make things a bit more predictable for you.

How to remove the space between paragraphs (p)

You can use margin: 0; to remove the spaces.

p { margin: 0; }

If this still don't work, try making it !important

p { margin: 0 !important; }

Check this

How to remove space between paragraph and specific html list

Paragraphs cannot contain ul so you need to change the HTML.

Then just remove margins from both.

  p, p + .nospaceabovelist {  margin: 0;  padding: 0;}
<p><strong>Reason</strong><br/> As part of the change from the NHS, the following drugs are unable to be prescribed by the doctor and requires a special consultant to prescribe these medications:</p><ul class="nospaceabovelist">  <li>Clonazepam</li>  <li>Imitrex</li>  <li>Amoxil</li>  <li>Sensipar</li></ul>

How to reduce the space between p tags?

use css :

p { margin:0 }

Try this wonderful plugin :)

EDIT: Firebug is now closed as a project, it was migrated to

Remove spacing between two paragraphs when displaying WYSIWIGS with ckeditor 4 in Angular

I solve the problem by removing the white-space:pre-wrap;. I Don't kwon why it's add a space between lines.

How to control the space between paragraph elements?

You can either use one paragraph and use a <br> to get to the next line, or you could set the margin of the paragraph tags to 0px.

Remove space above and below p tag HTML

<p> elements generally have margins and / or padding. You can set those to zero in a stylesheet.

li p {
margin: 0;
padding: 0;

Semantically speaking, however, it is fairly unusual to have a list of paragraphs.

Remove spacing between cols

add a class when you need to remove spaces use it


in html write this class

<div class="row">
<div class="col-md-2 padding-0">
//stuff here for this column
<div class="col-md-10 padding-0">
//stuff here for columns

Related Topics

Leave a reply