I am trying to keep these two divs on the same line. But whenever I add a P element inside the first Div, it moves to the new line. I have tried assigning display property to "inline-block" to each element, but it doesn't work. Can you please help, I have the following code:
.tile {
height: 100px;
width: 100px;
background-color: rgb(250, 250, 156);
border: 5px solid red;
display: inline-block;
vertical-align:top
}
p {
display: inline;
margin:0;
}
<div class="tile">
<p>Hello</p>
</div>
<div class="tile"></div>