Forum Moderators: not2easy
I killed the CSS background by putting 'style="background-image:url();"' in my "body" tag, but the JavaScript to change the background color no longer works when I include the CSS.
You have a Javascript that changes the background-color, correct?
Then you hard-coded (in effect) a background-image into the body tag, correct?
You can change background color all day long, and it won't show. The background image will override it (or layer on top of it, or whatever.)
If this doesn't lead you to a path of enlightenment, no one's going to be able to help you a lot until you post some code.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US">
<head>
<title>My Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link href="style1.css" rel="stylesheet" type="text/css" />
</head>
<body background="jaa_bgnd.jpg" bgcolor="#ffffee" text="black"
link="blue" vlink="#800088" alink="red">
This is page content.
</body>
</html>
and the original CSS like this:
p {
text-align: justify
}
I wanted to change the html to:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US">
<head>
<title>My Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link href="style1.css" rel="stylesheet" type="text/css" />
</head>
<body>
This is page content.
</body>
</html>
and the CSS to this:
body {
background-image: url(jaa_bgnd.jpg);
background-color: #ffffcc;
color: black;
}
a:link {color: blue; }
a:visited {color: #800088; }
a:hover {color: orange; }
a:active {color: red; }
p {
text-align: justify
}
I've finally decided that I need two different "body" references in the CSS file, so I changed all of the html files accordingly and made the CSS file like this:
body.body1 {
background-image: url(jaa_bgnd.jpg);
background-color: #ffffcc;
color: black;
}
body.body2 {
color: black;
}
a:link {color: blue; }
a:visited {color: #800088; }
a:hover {color: orange; }
a:active {color: red; }
p {
text-align: justify
}
The site URL before changes is listed below, and the problem page is the "Tables > Browser Colors" page:
<Sorry, no personal URLs.
See Forum Charter [webmasterworld.com]>
[edited by: tedster at 6:52 pm (utc) on June 20, 2005]
That was a "before" version.
> Mobey_Dim: Remove the url (urls have to be sent by sticky, not be published)
I don't see an "edit" button. Can you tell me how? Thanks.
Ah! I see an "owner edit" button on THIS post, but not on the previous one. I still need help with that.