Remove top and bottom padding of a paragraph?
css, html
Solution
You could wrap in div then give it a negative margin DEMO http://jsfiddle.net/kevinPHPkevin/Dqmu8/7/
p{
line-height: 2.2;
margin:-10px 0 -10px 0;
}
div{
width: 200px;
border: 1px solid red;
}
Problem
I want to remove the top and bottom padding of a paragraph text without changing the line height of the text. Please see the image below, I want the top and bottom border without any padding between it and text. The paragraph height is not fixed. HTML: ``` <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. </p> ``` CSS: ``` p{ width: 200px; line-height: 2.2; border: 1px solid red; } ``` Demo: http://jsfiddle.net/Dqmu8/