Table of Contents
|
All Slides
|
Link List
|
Examples
|
CSCI E-75
<< previous
|
next >>
Backgrounds aren't just for the "body"
Here we use the following images as backgrounds in
div
elements.
wood.jpg
marble.jpg
water.jpg
Example 10.27
Example 10.27 Source:
<div class="wood" > Wood <div class="marble" > Marble <div class="water" > Water </div> </div> </div>
In
style
element (
<style type="text/css">
) within
head
element:
body { font-size: 18pt; font-weight: bold; color: white;} div.wood { padding: 1em; background-image: url(images/wood.jpg); } div.marble { background-image: url(images/marble.jpg); padding: 1em; } div.water { background-image: url(images/water.jpg); padding: 1em; }
Example 10.27 Rendered:
With Styles
Without Styles
Table of Contents
|
All Slides
|
Link List
|
Examples
|
CSCI E-75
<< previous
|
next >>