View Full Version : Whenever I use "background"...


xaryn
07-17-2005, 08:21 PM
Whenever I use the "background" element in my stylesheet, I specify the default background colour as well as the background image... but when I view my page with the new style in place, the background image disappears, and the background doesn't change colour either.

Since I'm not sure what you need, I'll give both my stylesheet and a sample page:

CSS:
body{
text-align : center;
}
table{
border : 1px solid #ffa;
}
td{
border : 1px solid #fff;
}
.spacer{
display : block;
line-height : 1px;
font-size : 1px;
height : 5px;
}
.spacer2{
display : block;
line-height : 1px;
font-size : 1px;
height : 32px;
}
.textarea{
background-color : #b4b4f0;
color : #000000;
font-weight : bold;
font-size : inherit;
font-family : inherit;
text-decoration : none;
border-color : #0000ff;
border-style : solid;
border-width : 1px;
}
a.link{
color : #822fff;
}
.title{
color : #0000ff;
font-weight : bold;
text-transform : uppercase;
text-decoration : underline;
}
.tablehead{
color : #000000;
font-weight : bold;
font-size : medium;
font-family : cursive;
text-decoration : none;
}
.tabletext{
color : #6900b0;
font-weight : bold;
}

Page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Starfur - Welcome to my furry world</title>
<link rel="shortcut icon" href="fur.ico" />
<link rel="stylesheet" href="default.css" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="keywords" content="starfur, furry, babyfur, homepage, writing, stories, music, artwork, pictures, fursuits, conventions, events, IRC, websites" />
<meta name="description" content="This is my homepage, containg furry pictures and poetry, stories, other writing and some music" />
<meta name="author" content="Star Taymar" />
<link rev="made" href="r351c624p(AT)yahoo.co.uk" />
<meta name="copyright" content="2005 by Star Taymar" />
<meta http-equiv="expires" content="Wed, 30 Jan 2005 21:29:02 GMT" />
<meta name="distribution" content="global" />
<meta name="robots" content="all" />
<meta name="rating" content="general" />
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
<meta http-equiv="content-language" content="en" />
<meta http-equiv="content-language" content="en-us" />
<meta name="generator" content="Win32Pad" />
<meta http-equiv="window-target" content="_top" />
<meta name="abstract" content="Starfur's furry world" />
</head>
<body background="bg.jpg" text="#000000">

<div class="textarea"><em>Welcome to my furry world!</em></div>
<span class="spacer2"></span>
<div class="textarea"><br />
<div align="center">

<table border="1" cellpadding="8" cellspacing="8" id="main">

<tr><td><span class="title">Site contents:</span></td><td><div class="spacer"></div></td></tr>

<tr><td><div class="spacer"></div></td><td><div class="spacer"></div></td></tr>

<tr><td><span class="tablehead"><a href="pageinfo.shtml">Page updates</a></span></td><td><span class="tabletext">See what's been added or changed</span></td></tr>

<tr><td><span class="tablehead"><a href="qa.shtml">Questions and Answers</a></span></td><td><span class="tabletext">A few important answers to furry questions</span></td></tr>

<tr><td><span class="tablehead"><a href="pictures.shtml">Pictures</a></span></td><td><span class="tabletext">Some galleries of furry photos, and coming soon, artwork</span></td></tr>

<tr><td><span class="tablehead"><a href="words/index.shtml">Poems</a></span></td><td><span class="tabletext">Some furry poems</span></td></tr>

<tr><td><span class="tablehead"><a href="sounds/sounds.shtml">Music</a></span></td><td><span class="tabletext">My favourite music</span></td></tr>

<tr><td><span class="tablehead"><a href="furryirc.shtml">IRC channels</a></span></td><td><span class="tabletext">Details of confirmed and reliable furry IRC chat servers and channels</span></td></tr>

<tr><td><span class="tablehead"><a href="furryurl.shtml">Furry sites</a></span></td><td><span class="tabletext">Some of the many furry-related web sites I've found</span></td></tr>

<tr><td><span class="tablehead"><a href="construction/index.shtml">Construction</a></span></td><td><span class="tabletext">I'm building my own fursuit from scratch...</span></td></tr>

</table><br /></div></div>

<span class="spacer2"></span>
<div class="textarea">Page written by <a href="mailto:r351c624p(AT)yahoo.co.uk?Subject=Starfur_pa ge">Star Taymar</a>
<br/>HTML help from <a href="http://www.htmlhelpcentral.com" target="_blank">HTML Help Central</a>
<br/>Hosting provided by <a href="http://www.furtopia.org" target="_blank">Furtopia.org</a> - thanks a lot!
</div>
<br />

<!--#include virtual="_inc/countw3c.inc" -->

</body>
</html>

The page as it is is at http://www.starfur.furtopia.org/index.shtml

Merike
07-17-2005, 08:44 PM
I can't find where you have defined your body background color. It's not in css nor in body tag.

However that worked for me:
body{
text-align : center;
background:#000 url(bg.jpg);
}