I am facing an issue with positioning two divs next to each other. Initially, using the display: inline-block;
property for both divs worked fine. However, as soon as I added a <p>
tag into one of the divs, its placement got messed up. Here is the current setup:
HTML:
<div class = "icon_container">
<button><img src="images/favorite.png" class = "profile_icons"/></button><p>1234</p>
</div>
<div class = "icon_container">
<button><img src="images/tool.png" class = "profile_icons"/></button>
</div>
CSS:
.icon_container {
height: 150px;
display: inline-block;
}
Fiddle: