CS3172 > Mats > examples/ > CSS/ > image trick
<style type="text/css"> h4#replace {background:url(funky-title.gif) no-repeat; height: 60px} span.remove {position:absolute; left:-500em} div.demo {border: thin dotted blue} </style> <!-- ... --> <div class="demo"> <h4 id="replace"> <span class="remove" >Funky title<br />as text</span> </h4> <p>The first paragraph under the funky title.</p> <div>
The first paragraph under the funky title.
If you are having trouble seeing the effect then you might benefit from viewing a screen capture (from a narrow Netscape window).
container?
<hr />
below?See Revised Image Replacement by Dave Shea at mezzoblue; and Graphical headings by Levin Alexander.
<hr />
)<style type="text/css"> hr#decorative background: url(flow28.gif) no-repeat; height:54px; width:600px; /* without clipping the original HR is diplayed over in MSIE */ clip:auto; overflow:hidden } </style> <div class="demo"> <hr id="decorative" /> </div>
If you are having trouble seeing the effect then you might benefit from viewing a screen capture (from a narrow Netscape window).
Comparisons of the webpage components with and without CSS are available as images.
Note that these techniques are suitable only for HTML and XHTML 1.0 and 1.1 because
XHTML 2's src
attribute will be
available on any element.
http://www.cs.dal.ca/~jamie/CS3172/examples/i-class/image-trick/image-background.html
funky image