I am trying to vertically align 2 divs. One defined size with background-image and the other is multiple lines of text (with a :before element above it). I don't have full control over how many because it depends on the width of the screen.
HTML
<div class="brand-wrap">
<a class="navbar-brand" href="<?php echo home_url(); ?>"></a>
<div class="brand-text">
<p>test text text text text text text ...</p>
</div>
</div>
CSS
.navbar-brand {
display: inline-block;
margin-top: 10px;
padding: 0;
height: 60px;
width: 60px;
background: url('img/logo_orig.png') no-repeat center center;
background-size: auto 100%;
}
.brand-wrap {
display: inline-block;
}
.brand-text {
position: relative;
font-size: 12px;
display: inline-block;
color: #fff;
}
.brand-text:before {
content: '';
display: block;
width: 50px;
height: 3px;
position: absolute;
left: 0;
top:-7px;
background-color: red;
}
What I have makes it beside each other, but not centred. I want something without a defined height for the 'text' div.