So, I'm trying to center my text vertically in a div, and then shift the div in the center on the right side of the image, as shown in the example:

I still:
HTML
<div class="header"> <div class="logo"> <img src="/images/logo.png" alt="logo"/> </div> <ul id="nav"> <li><a href="$HOME_PAGE_LINK$">Portfolio</a></li> <li><a href="#">About</a></li> <li><a href="#">Contact</a></li> </ul> <div id="headerPro"> <div class="headerAvatar"> <img src="http://i.imgur.com/DQBOgkw.png" alt="avatar" /> </div> <div class="headerText"> This is some text. </div> </div> </div>
CSS
#headerPro { position:absolute; top: 35px; right: 50px; width:450px; height:100px; } .headerAvatar { margin-top:10px; margin-left:150px; background: #242426; width: 70px; height: 70px; padding: 5px; border-radius: 50%; } .headerAvatar img{ display: block; width: 100%; border: 0; margin: 0; border-radius: 50%; } .headerText { height:50px; width:200px; text-align:center; background-color:red; }
source share