I am having no luck trying to align some text. I tested with the Overflow Hidden value removed but still couldn't get it looking how I would like.
Here is a codepen page example: http://codepen.io/anon/pen/oXrPGJ
HTML
<div>
<article>
<section>
<h2 class="colourtitle">
<img class="sideimage" src="http://placehold.it/256x256">
I'm glad I wrap, wish I was vert mid
</h2>
</section>
<article>
</div>
And the CSS
html {
color: #222;
font-size: 1em;
line-height: 1.4;
}
body {
font: 16px/26px Helvetica, Helvetica Neue, Arial;
}
h2 {
padding-top: 1.5em !important;
overflow: hidden !important;
}
.colourtitle {
border-bottom-style: solid;
border-bottom-color: red;
border-bottom-width: 10px;
padding: 5px 0 0 0;
}
.sideimage {
display: inline-block;
margin-right: 0.5em;
max-width: 70px;
padding-top: 10px;
border-right-style: solid;
border-right-color: red;
border-right-width: 10px;
float: left;
}
I have Top Padding on my header tag, because on my actual page there will be many of these stacked, so just creates a nice white space.
I have set the Overflow Hidden, so that when viewed on a mobile screen the text wraps as I wish, and does not sit beneath the image.
h2 {
padding-top: 1.5em !important;
overflow: hidden !important;
}
You can see I'm using a thumb image, which has a right side border to it. Along with an H2 tag, and that's all using a bottom side border.
But, I would like the text to be a little bit lower, so that it positions in the middle vertically, but still does the wrapping when needed on small screens.
I hope that is clear, and that someone can help me out with a snipped of code required. Thanks