span inside a h2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
h2 {
font:3em/1em Times, serif;
font-weight: bold;
margin:0;
position: relative;
overflow: hidden;
float: left;
}
h2 span {
position: absolute;
width: 100%;
height: 5em;
background: url(http://java2s.com/style/logo.png);
}
p {
clear: left;
}
</style>
</head>
<body>
<h2><span></span>Designing Instant Gratification</h2>
<p>I had to wake up early for the dentist appointment this morning. Why is it that on the day I have to wake up really early it interferes with a good sleep? I had the blankets wright where they were most comfortable, too.
<p>If that ever happens, our society should allow you to tell the other person you were late because you realized you were in the middle of "a good sleepy". It's the positive version of "I was in a car accident."
<p>Try the phrase out, see how it works and report back to me.</p>
</body>
</html>
Related examples in the same category