Case 1: HTML

  1. <h2><a href="#"><span></span>What We Do</a></h2>
  2. <p class="tagline"><span></span>Share Our Strength and our thousands of volunteers, chefs, and orporate partners have had a significant impact on the state of hunger in the United States and abroad.</p>

Case 1: CSS

  1. #case1 h2 {
  2.   padding: 0;
  3.   margin: 0 0 6px 0;
  4.   width: 198px;
  5.   height: 31px;
  6.   overflow: hidden;
  7. }
  8.  
  9. #case1 h2 span {
  10.   position: absolute;
  11.   background: url("h2_what.gif") no-repeat;
  12.   width: 198px;
  13.   height: 31px;
  14. }
  15.  
  16. #case1 p.tagline {
  17.   margin: 0 0 1.5em 0;
  18.   padding: 0;
  19.   font-size: 100%;
  20.   font-weight: bold;
  21.   line-height: 1.4em;
  22.   color: #63604A;
  23.   width: 526px;
  24.   height: 56px;
  25.   overflow: hidden;
  26. }
  27.  
  28. #case1 p.tagline span {
  29.   position: absolute;
  30.   background: url("h4_what.gif") no-repeat;
  31.   width: 526px;
  32.   height: 56px;
  33. }

« Back to Main «