based on the code provided , you could give the H2 display:inline-block; and then use a pseudo element ( since floating the IMG takes out of the regular flow). The pseudo element should be of equal height to your image.
So the code would look something like this:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Example</title>
<style type="text/css">
header{
display: block;
background: #CC3;
line-height: 1;}
header:after{content:""; display:inline-block; width: 1px; margin-right: -1px; vertical-align: middle}
header img, header:after{
height: 60px;}
header img{
width: 256px;
float:right;
}
header h2{
margin:0;
padding:0;
display:inline;
vertical-align: middle;
line-height: 1.2 ; /* optional*/
}
</style>
</head>
<body>
<header>
<img class="table-cell" src="media/ad.gif" alt="advertisement"/>
<h2>Travel Guide</h2>
</header>
</body>
</html>
hope that helps
Bookmarks