Remove the spacing between <p>
I want to remove spaces between paragraphs, so all my text does not have any space between each other, but I do not know which proprety I should use.
I know line-height , but tried to combine with different values ββand could not find the correct one.
Code example:
<style> p { margin:0; padding:0; font-size:60px; } div { margin:0; padding:0; background-color:red; } </style> <div> <p>test</p> <p>test</p> </div> Image of code (I want to remove the space between "test" and "test"):

This space is not between paragraphs. that space is given to the symbols themselves. The type has an empty space around it (partly for placing ascenders and descenders).
If you want to remove the space between lines of text, you need to put the text in the same paragraph and adjust the line height.
But even then, pay attention that you will never get it for sure, since each font and font will have different indicators, and you will not always know which font will be displayed on the end userβs screen. Using a web font will make things more predictable for you.
Check this out: http://jsfiddle.net/a45Mm/
HTML
<p>The quick brown fox jumps over the lazy dog.</p> <p id='p2'>The quick brown fox jumps over the lazy dog.</p> CSS
p { font-size : 30px; background-color : #cfc; padding : 0; margin : 0; line-height : 20px; } #p2 { background-color : #fcc; } You need to use all three properties.
margin : 0: this will remove the space between two paragraphs.padding : 0: this will remove the space between the border and the text of each paragraph.line-height : 20px: This will reduce the distance between different lines in each paragraph. A value of0for this property will cause all rows on the same row to overlap everything.
You can adjust the line height to get the minimum distance you are looking for.
Fiddle: http://jsfiddle.net/chucknelson/UtwXk/
p { margin: 0; padding:0; font-size:60px; line-height: .75em; }