span inside a h2 : span « Tags « HTML / CSS






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

1.'span' Example
2.span line-height: 0.6em;
3.span display: none;
4.span float: right;
5.Empty span with background image
6.Using span to highlight one letter
7.Using span to create author part of a quotation
8.Using span to highlight
9.Span inside a DIV
10.Span padding: 0 57px;
11.Span color: #786B50;
12.Span display: block;
13.Span float: left;
14.Span letter-spacing: 6px;
15.Span width: 1000px;
16.Span position: absolute;
17.Span top: 206px;
18.Span left: 86px;
19.Span color: #140A00
20.Let DIV span two columns
21.span with class selector
22.span padding: 0 10px;
23.span background: mistyrose;
24.span float left
25.span border: 1px solid rgb(200, 200, 200);
26.span background: rgb(244, 244, 244);
27.span background: white;
28.span border: 1px solid black;
29.Using span to create quotation
30.span.color {color:#FF0000;}
31.Capital first letter with span
32.Style a letter with span
33.Inline style for Span
34.The span element can be used to group inline elements only.
35.span with id style
36.Inline Spacer
37.Inline Decoration solid
38.Inline Decoration by border
39.Inline Decoration with image
40.span in a h2 with absolute position
41.SPAN in anchor
42.Span in a H2
43.Shrinkwrapped SPAN by setting both width and height to auto
44.Horizontally Stretched Absolute SPAN
45.Line break with margin top
46.Default line space with margin 0
47.One and half Line break with margin-top: 1.5em
48.Invisible inline horizontal rule: a line-break.
49.Double-border inline horizontal rule.
50.Background inline horizontal rule with image
51.Combination Inline horizontal rule.
52.Use SPAN to style Blocked area
53.Absolute centered