.block{
background-color: pink;
display: inline;
}
.inline{
display: block;
/* display: block; */
/* display: inline-block; */
padding: 5px;
margin: 5px;
}
<div>
Block content <p>
*To get rid off the space between two inline elements do one of theese things:
- delete white spaces between the two tags in the html
- assign a -4px left margin to the second element
- reduce the font-size of the parent element to 0 (and do not forget to redefine a proper font-size for the current elements)
just a test