It isn't a table, I just used "row" for lack of a better word.
My problem is that I've got a set of display:inline-block
elements and an element under those, but there's a gap between them. Note that I'm not talking about the space between the inline elements, I'm talking about the space between the row of inline elements and the other element. I've tried the solution mentioned here, setting a line-height
and font-size
, but that didn't help at all (which is why it isn't in the code below)
Here's my code:
HTML
<div id="letterhead">
<div class="name"></div><div class="logo"></div><div class="name"></div>
<div class="subtext"></div>
</div>
CSS
body{
background:#eee;
width: 100%;
}
#letterhead {
position: absolute;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 100%;
height: 12rem;
font: 32px Tahoma;
color: #777;
padding: 2rem;
}
.logo {
display: inline-block;
width: 7rem;
height: 7rem;
background: #000;
}
.name {
display: inline-block;
height: 7rem;
width: calc((100% - 7rem) / 2);
background: #fff;
}
.subtext {
//position: absolute;
margin: 0;
padding: 0;
top: 9rem;
text-align: center;
width: 100%;
height: 1rem;
background: #555;
}
I made a Fiddle here.
Thanks in advance.