Question

How do you make no spaces between top and bottom text... For example:

<p>Hi</p>
<p>Bye</p>

Like, how do you put no space in the middle of that? I could use a CSS of HTML code...

Thanks!

Was it helpful?

Solution

There's a margin between the paragraphs. To get rid of it, you'll need to set the margin via CSS:

p {
    margin: 0;
}

To get "Hi" and "Bye" on the same line, you'd either change the display of p elements, or change the markup:

change display:
p {
    display: inline;
    //or
    display: inline-block;
}
change markup:
<p>Hi Bye</p>

OTHER TIPS

How about:

<p>Hi<br/>
Bye</p>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top