CSS query.

  • Thread starter John Fitzsimons
  • Start date
J

John Fitzsimons

Hi,

I have two web sites. On one I have the following in the header ;

<BODY BGCOLOR="#FFFF86" BACKGROUND="web15.jpg">

On the other I have a style sheet as follows ;

BODY { background: #FFFF86; color: #000000;

It seems like whatever way I try to incorporate the former into the
latter it doesn't display correctly. Can anyone here tell me what I
might be doing wrong and how to make the CSS display the same
as the first site please ? Or cannot graphics be part of a CSS ?

Any help appreciated. TIA.

Regards, John.
 
S

Steve Pugh

I have two web sites. On one I have the following in the header ;

<BODY BGCOLOR="#FFFF86" BACKGROUND="web15.jpg">

On the other I have a style sheet as follows ;

BODY { background: #FFFF86; color: #000000;

It seems like whatever way I try to incorporate the former into the
latter it doesn't display correctly.

Perhaps it would help if you said what you had tried and didn't work?
Can anyone here tell me what I
might be doing wrong and how to make the CSS display the same
as the first site please ? Or cannot graphics be part of a CSS ?

body {background-color: #FFFF86; background-image: url(web15.jpg);
color: #000000;}

or

body {background: #FFFF86 url(web15.jpg); color: #000000;}

It's all in the CSS spec:
http://www.w3.org/TR/CSS2/colors.html#q2

Steve
 
T

Toby Inkster

John said:
<BODY BGCOLOR="#FFFF86" BACKGROUND="web15.jpg">

On the other I have a style sheet as follows ;

BODY { background: #FFFF86; color: #000000;

It seems like whatever way I try to incorporate the former into the
latter it doesn't display correctly.

Do you mean like this?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<title>Example page</title>
<style type="text/css">
body {
background: #FFFF86 url("web15.jpg") repeat scroll top left;
color: #000000;
}
</style>
<body>
...
</body>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top