Live page here.
Given this HTML page:
section[role=main] {
margin: 1em;
width: 95%;
border: 1px solid #999;
}
section[role=main] article {
width: 40%;
height: 180px;
margin: 1em;
display: inline-block;
border: 1px solid black;
}
<section role="main">
<article>Java</article>
<article></article>
</section>
<section role="main">
<article>Java</article>
<article>JavaScript</article>
</section>
I expect both of my articles to be aligned, but as it can be seen in the screenshot below, only when both of my articles have text the <article>
elements are center aligned:
Any ideas what is causing this behavior and how can it be fixed?