Forum Moderators: open
For example:
body {
background:#fff url(images/bk_image1.gif) fixed bottom-left no-repeat;
}
The above will display an image in the left hand bottom of the page display. The image will remain fixed, and will NOT scroll with the normal body content. (Not supported by NN4).
The following creates a class for un-ordered lists that also contains a background-image:
ul.f {
margin-left:20px;
border:1px solid black;
background-image: url(assets/bk_fc0456.jpg)
}
And here is an example for displaying a heading <h1> with a background-image:
h1 {
font:22px #c00;
background:#ffc url(assets/bk_fc0456.jpg);
padding:3px 3px 3px 15px;
border:solid black;
}
Best of luck!
- papabaer
(edited by: papabaer at 11:54 pm (utc) on May 12, 2002)
div.one {
background-image:url(images/mypic.jpg);
}
Can also be written as:
div.one {
background:url(images/mypic.jpg);
}
If you assign a color to the font contained within the style declaration for a given element, id or class, you need to include a background-color for CSS validation.
So you might have a <div> class written as such:
div.shoutouts {
width:300px;
height:auto;
background:#fc0 url(assets/angry-man.gif) fixed top-right no-repeat;
color:#600;
border:3px solid red;
}