By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,739 Members | 1,081 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,739 IT Pros & Developers. It's quick & easy.

background-color: #777777 not working in CSS

P: n/a
When I declare on HTML page

<LINK href="mycss.css" type="text/css" rel=stylesheet />
....
<BODY class=myclass>

in mycss.css

BODY { FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Arial, Geneva; background-image: url(images/back.jpg); }

BODY.myclass { FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY: Arial, Geneva; background-color: #777777; }
....

the background-color in the second declaration is NOT taken but the "normal" background image back.jpg is used for the background.

How do I get #777777 as background-color ?

Kevin

Jul 20 '05 #1
Share this Question
Share on Google+
27 Replies


P: n/a
Kevin Yu wrote:
BODY { FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Arial, Geneva; background-image: url(images/back.jpg); }

BODY.myclass { FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY: Arial, Geneva; background-color: #777777; }
....

the background-color in the second declaration is NOT taken but the "normal" background image back.jpg is used for the background.

How do I get #777777 as background-color ?


Background images are painted on top of the background color. You may
declare
background-image none
for BODY.myclass
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 20 '05 #2

P: n/a
Kevin Yu wrote:
BODY { FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Arial,
Geneva; background-image: url(images/back.jpg); }

BODY.myclass { FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY: Arial,
Geneva; background-color: #777777; } ...

the background-color in the second declaration is NOT taken but the
"normal" background image back.jpg is used for the background.


Sure it is, but the background you are specifying has two properties:
image and color. As you are specifying both properties, both are applied
with the image being laid over a background that is colored according to
your specification.

Try replacing the 'background-color' and 'background-image' properties
with 'background' properties instead, and then the second definition of
the background should take precedence.

--
Dylan Parry
http://webpageworkshop.co.uk - FREE Web tutorials and references

'I am a Bear of Very Little Brain, and long words bother me.' -- A A Milne
Jul 20 '05 #3

P: n/a
ky*******@lycos.net (Kevin Yu) wrote:
<BODY class=myclass>

BODY { FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Arial,
Geneva; background-image: url(images/back.jpg); }

BODY.myclass { FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY: Arial,
Geneva; background-color: #777777; }

the background-color in the second declaration is NOT taken but the
"normal" background image back.jpg is used for the background.

How do I get #777777 as background-color ?


It already is.
You've set both a background-color and a brackground-image. The
background-color will be used when the image doesn't load or in any
parts of the page where the image doesn't show (i.e. if you prevent
tiling).

To eliminate the background-image from the second style change it to
body.myclass {background-image: none; background-color: #777777;}

And setting font sizes in pixels is a really bad idea.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #4

P: n/a
Kevin Yu wrote:
When I declare on HTML page

<LINK href="mycss.css" type="text/css" rel=stylesheet />
...
<BODY class=myclass>

in mycss.css

BODY { FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Arial, Geneva; background-image: url(images/back.jpg); }

BODY.myclass { FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY: Arial, Geneva; background-color: #777777; }
...

the background-color in the second declaration is NOT taken but the "normal" background image back.jpg is used for the background.

How do I get #777777 as background-color ?


background-image and background-color are independent properties. Your
"myclass" body inherits both properties, and the image is displayed on
top of the color. You want:

body.myclass { ... ; background-image: none; background-color: #777; }

....where #777 is CSS colour shorthand for #777777 [1].

As you seem to be writing in XHTML (<link ... />), you need to use
lower-case element names [2] and you must enclose all element attributes
in quotes (class="myclass") [3].

[1] http://www.w3.org/TR/REC-CSS1#color-units
[2] http://www.w3.org/TR/xhtml1/#h-4.2
[3] http://www.w3.org/TR/xhtml1/#h-4.4

--
Mark.
http://tranchant.plus.com/
Jul 20 '05 #5

P: n/a
Kevin Yu wrote:
When I declare on HTML page

<LINK href="mycss.css" type="text/css" rel=stylesheet />
....
<BODY class=myclass>

in mycss.css

BODY { FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Arial, Geneva; background-image: url(images/back.jpg); }

BODY.myclass { FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY: Arial, Geneva; background-color: #777777; }
....

the background-color in the second declaration is NOT taken but the "normal" background image back.jpg is used for the background.


Can't have it both ways, that is, you can't define two instances of
BODY. Only one BODY to a page.

If you want a plain background, then you have to ditch the background
image. While you're at it, ditch one of the BODY style declarations.

Arondelle
--
================================================== =========
To email me, empty the pond with a net

Jul 20 '05 #6

P: n/a
Arondelle <ar*********@verizon.pond> wrote:
Can't have it both ways, that is, you can't define two instances of
BODY. Only one BODY to a page.


But you can have many different pages on a site, all using the same
linked stylesheet, so having some pages with different body styles is
perfectly acceptable. How would you style those pages? With a separate
stylesheet? With inline styles? Why would you prefer those over using
a class?

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #7

P: n/a
In news:ce*************@news.t-online.com,
Kevin Yu <ky*******@lycos.net> expounded:
| When I declare on HTML page
|
| <LINK href="mycss.css" type="text/css" rel=stylesheet />
| ...
| <BODY class=myclass>
|
| in mycss.css
|
| BODY { FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY:
| Arial, Geneva; background-image: url(images/back.jpg); }
|
| BODY.myclass { FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY:
| Arial, Geneva; background-color: #777777; } ...
|
| the background-color in the second declaration is NOT taken but the
| "normal" background image back.jpg is used for the background.
|
| How do I get #777777 as background-color ?
|
| Kevin

try background-image:none; in second declaration.Also you don't need to
repeat the font-weight or font-family. They will inherit.
--

stephen
Jul 20 '05 #8

P: n/a
Kevin Yu <ky*******@lycos.net> wrote:
the background-color in the second declaration is NOT taken but the
"normal" background image back.jpg is used for the background.


You can have both background color and background image at the same
time. So defining a background color will not remove or overwrite the
background image. And because the background image is drawn over the
background color, you won't see the background color in your example
(only if the background image has transparent parts, you would see the
background color shining through). To remove the background image, you
have to explicitely define no background image for "BODY.myclass".

--
Alexander
Jul 20 '05 #9

P: n/a
On 3/8/04 2:20 pm, Kevin Yu wrote:
When I declare on HTML page

<LINK href="mycss.css" type="text/css" rel=stylesheet />
...
<BODY class=myclass>

in mycss.css

BODY { FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Arial,
Geneva; background-image: url(images/back.jpg); }

BODY.myclass { FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY: Arial,
Geneva; background-color: #777777; }
...

the background-color in the second declaration is NOT taken but the "normal"
background image back.jpg is used for the background.

How do I get #777777 as background-color ?

Kevin


Add "background-image: none;" to the second rule.
--
Philip Ronan
ph***********@virgin.net
(Please remove the "z"s if replying by email)
Jul 20 '05 #10

P: n/a
Kevin Yu wrote:
How do I get #777777 as background-color ?


The method you are using is highly redundant. Why would the body tag
need a class and a general statement?

Anyway, change the body.myclass block to:

body.myclass {
background-image: none;
background-color: #777777;
font-size: 15px;
}

You should also read up on why pixels (and points) are bad units for
fonts. IE cannot resize them, so if they are too small for the user,
they are stuck with it.
--
Michael Wilcox
Jul 20 '05 #11

P: n/a
In our last episode,
<ce*************@news.t-online.com>,
the lovely and talented Kevin Yu
broadcast on comp.infosystems.www.authoring.html:
When I declare on HTML page <LINK href="mycss.css" type="text/css" rel=stylesheet />
...
<BODY class=myclass> in mycss.css BODY { FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Arial, Geneva; background-image: url(images/back.jpg); } BODY.myclass { FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY: Arial, Geneva; background-color: #777777; }
... the background-color in the second declaration is NOT taken but the "normal" background image back.jpg is used for the background. How do I get #777777 as background-color ?


I could be wrong, but it appears to me that BODY.myclass is
inheriting background-image from BODY so that BODY.myclass
gets background-color plus background-image, and of course
the background-image covers the color. I think using
background: to reset all of the background attributes will
solve this.
--
Lars Eighner -finger for geek code- ei*****@io.com http://www.io.com/~eighner/
If it wasn't for muscle spasms, I wouldn't get any exercise at all.
Jul 20 '05 #12

P: n/a
In our last episode,
<16NPc.965$rX6.644@trndny02>,
the lovely and talented Arondelle
broadcast on comp.infosystems.www.authoring.stylesheets:
Can't have it both ways, that is, you can't define two instances of
BODY. Only one BODY to a page.
But of course you can have as many as you please. You can't have
two BODY elements in an HTML document, but that is nothing to do
with css. However, you have to understand the cascade, which
entails that when you have

BODY { ... }

BODY.something { ... }

BODY.something will inherit everything from BODY.
If you want a plain background, then you have to ditch the background
image. While you're at it, ditch one of the BODY style declarations.


Not necessary. All you have to do is reset the backgrond-image to
none.

--
Lars Eighner -finger for geek code- ei*****@io.com http://www.io.com/~eighner/
If it wasn't for muscle spasms, I wouldn't get any exercise at all.
Jul 20 '05 #13

P: n/a
Michael Wilcox wrote:
The method you are using is highly redundant. Why would the body tag
need a class and a general statement?


In the case that the stylesheet is being shared amongst multiple HTML
documents, and this body needs a different style to the others.

--
Mark.
http://tranchant.plus.com/
Jul 20 '05 #14

P: n/a
ky*******@lycos.net (Kevin Yu) wrote in
news:ce*************@news.t-online.com:
When I declare on HTML page

<LINK href="mycss.css" type="text/css" rel=stylesheet />
...
<BODY class=myclass>

in mycss.css

BODY { FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY:
Arial, Geneva; background-image: url(images/back.jpg); }

BODY.myclass { FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY:
Arial, Geneva; background-color: #777777; } ...

the background-color in the second declaration is NOT taken but the
"normal" background image back.jpg is used for the background.

How do I get #777777 as background-color ?


By default, when an element has background-image and background-color
defined, it will display the background-image on top of the background-
color. So set the background-image to 'none':

BODY.myclass { FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY:
Arial, Geneva; background-color: #777777; background-image: none; }

--
Accessible web designs go easily unnoticed;
the others are remembered and avoided forever.
Jul 20 '05 #15

P: n/a
In article <ce*************@news.t-online.com>,
ky*******@lycos.net (Kevin Yu) wrote:
When I declare on HTML page

<LINK href="mycss.css" type="text/css" rel=stylesheet />
Quote your attributes.
<BODY class=myclass>
Quote your attributes. XHTML should be written in lowercase, not
uppercase. Soon somebody here will be responding and asking you why you
use XHTML in the first place and not HTML.

'myclass' is a bad name for a class. Make it descriptive for it's
purpose, like 'gallery' when the page is a gallery of photos or
'contact' when it contains contact information. How will you know what
this class is for in six months when you have to alter something?
in mycss.css

BODY { FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Arial,
Geneva; background-image: url(images/back.jpg); }
When your markup is written in lowercase, make your CSS selectors also
be lowercase.

Don't specify fonts in pixels. Use percentages, ems or keywords instead.
Font size in pixels does not scale in IE when the visitor changes the
size of the displayed text.

For font-family, also specify a generic family. In this case, you
probably want sans-serif:

font-family: Arial, Geneva, sans-serif;
BODY.myclass { FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY: Arial,
Geneva; background-color: #777777; }
Don't forget to specify a foreground color as well, or else somebody's
browser's default text color or user style sheet may come in and make
your page unreadable. You have no certainty that my browser's default
foreground color is purple. Oh, you were counting on black? :)
the background-color in the second declaration is NOT taken but the "normal"
background image back.jpg is used for the background.

How do I get #777777 as background-color ?


Maybe the image is covering the background color?

Try some of the above suggestions to fix your markup. Does the problem
persist? Do you have a URL perhaps? That is easier for us. There may be
something you didn't notice and we don't know until we see the offending
page.

--
Kris
<kr*******@xs4all.netherlands> (nl)
Jul 20 '05 #16

P: n/a
On Tue, 3 Aug 2004 15:20:38 +0200, ky*******@lycos.net (Kevin Yu) wrote:
BODY { FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Arial, Geneva; background-image: url(images/back.jpg); }

BODY.myclass { FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY: Arial, Geneva; background-color: #777777; }
...

the background-color in the second declaration is NOT taken but the "normal" background image back.jpg is used for the background.

How do I get #777777 as background-color ?


{ background-image: none; } should do it.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #17

P: n/a
For a body tag of the myclass class, both the background-image
declaration and the background-color declaration are applied to it.
The background-image declaration takes precedence. You need to
explicitly set background-image: none in the body.myclass rule.

http://www.w3.org/TR/CSS2/colors.htm...und-properties
ky*******@lycos.net (Kevin Yu) wrote in message news:<ce*************@news.t-online.com>...
When I declare on HTML page

<LINK href="mycss.css" type="text/css" rel=stylesheet />
...
<BODY class=myclass>

in mycss.css

BODY { FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Arial, Geneva; background-image: url(images/back.jpg); }

BODY.myclass { FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY: Arial, Geneva; background-color: #777777; }
...

the background-color in the second declaration is NOT taken but the "normal" background image back.jpg is used for the background.

How do I get #777777 as background-color ?

Jul 20 '05 #18

P: n/a

"Lars Eighner" <ei*****@io.com> wrote in message
news:sl*********************@goodwill.io.com...
In our last episode,
<ce*************@news.t-online.com>,
the lovely and talented Kevin Yu
broadcast on comp.infosystems.www.authoring.html:
When I declare on HTML page
<LINK href="mycss.css" type="text/css" rel=stylesheet />
...
<BODY class=myclass>

in mycss.css

BODY { FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Arial, Geneva; background-image: url(images/back.jpg); }
BODY.myclass { FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY: Arial,
Geneva; background-color: #777777; } ...

the background-color in the second declaration is NOT taken but the

"normal" background image back.jpg is used for the background.
How do I get #777777 as background-color ?


I could be wrong, but it appears to me that BODY.myclass is
inheriting background-image from BODY so that BODY.myclass
gets background-color plus background-image, and of course
the background-image covers the color.


Though this looks like inheritance, there is no inheritance in CSS. The BODY
selector and the BODY.myclass selector both match the BODY tag, so both
apply following the usual cascade rules, but the fact that both selectors
involve BODY is not involved in this. The background-related properties
would be applied in the same way if the page had:

body { FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Arial, Geneva;
background-image: url(images/back.jpg); }
..myclass { FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY: Arial,
Geneva; background-color: #777777; }
....
<body class="myclass">

or

..xxx { FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Arial, Geneva;
background-image: url(images/back.jpg); }
..yyy { FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY: Arial, Geneva;
background-color: #777777; }
....
<body class="xxx yyy">

Jul 20 '05 #19

P: n/a
"Harlan Messinger" <h.*********@comcast.net> wrote:
I could be wrong, but it appears to me that BODY.myclass is
inheriting background-image from BODY so that BODY.myclass
gets background-color plus background-image, and of course the
background-image covers the color.
Though this looks like inheritance, there is no inheritance in CSS.


There is. But probably you mean that there is no inheritance involved in
_this_ phenomenon, and that's correct:
The BODY selector and the BODY.myclass selector both match the BODY
tag, so both apply following the usual cascade rules,


Indeed. But children of BODY may, by certain rules, inherit properties
from BODY, and so on.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #20

P: n/a

"Jukka K. Korpela" <jk******@cs.tut.fi> wrote in message
news:Xn*****************************@193.229.0.31. ..
"Harlan Messinger" <h.*********@comcast.net> wrote:
I could be wrong, but it appears to me that BODY.myclass is
inheriting background-image from BODY so that BODY.myclass
gets background-color plus background-image, and of course the
background-image covers the color.


Though this looks like inheritance, there is no inheritance in CSS.


There is. But probably you mean that there is no inheritance involved in
_this_ phenomenon, and that's correct:
The BODY selector and the BODY.myclass selector both match the BODY
tag, so both apply following the usual cascade rules,


Indeed. But children of BODY may, by certain rules, inherit properties
from BODY, and so on.


Yes, sorry about the imprecision. I should have said there's no inheritance
among CSS rule sets.

Jul 20 '05 #21

P: n/a
Els
Kevin Yu wrote:
When I declare on HTML page

<LINK href="mycss.css" type="text/css" rel=stylesheet />
...
<BODY class=myclass>

in mycss.css

BODY { FONT-WEIGHT: bold; FONT-SIZE: 12px;
FONT-FAMILY: Arial, Geneva; background-image:
url(images/back.jpg); }

BODY.myclass { FONT-WEIGHT: bold; FONT-SIZE: 15px;
FONT-FAMILY: Arial, Geneva; background-color: #777777; }
...

the background-color in the second declaration is NOT taken
but the "normal" background image back.jpg is used for the
background.

How do I get #777777 as background-color ?


I'm not sure how you can have two body's here, one with and
one without a class, maybe on different pages?
Anyway, to make the background-image not apply, use
background:#777777; instead of background-color:#777777;. This
way you set the colour to #777777 and all the other background
properties to default, and the image will not be applied.

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos v„o. O resto ť imperfeito.
- Renato Russo -
Jul 20 '05 #22

P: n/a
"Kevin Yu" <ky*******@lycos.net> skrev i melding
news:ce*************@news.t-online.com...
When I declare on HTML page

<LINK href="mycss.css" type="text/css" rel=stylesheet />
...
<BODY class=myclass>

in mycss.css

BODY { FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Arial, Geneva; background-image: url(images/back.jpg); }
BODY.myclass { FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY: Arial, Geneva; background-color: #777777; } ...

the background-color in the second declaration is NOT taken but the "normal" background image back.jpg is used for the background.
How do I get #777777 as background-color ?


The BODY will be applied first, right before the individual class.
Additionally, the background-image will cover whatever background-color is
used. So basically, your #777777 background color is hiding behind the
background image.

One way to solve this, might be to replace the background-image using
BODY.myclass and a reference to a blank transparent GIF. This may or may not
work for all browsers, however, but I do know IE allows this.

--
Kim Andrť AkerÝ
- ki******@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
Jul 20 '05 #23

P: n/a

"Kevin Yu" <ky*******@lycos.net> wrote in message
news:ce*************@news.t-online.com...
When I declare on HTML page

<LINK href="mycss.css" type="text/css" rel=stylesheet />
...
<BODY class=myclass>

in mycss.css

BODY { FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Arial, Geneva; background-image: url(images/back.jpg); }
BODY.myclass { FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY: Arial, Geneva; background-color: #777777; } ...

the background-color in the second declaration is NOT taken but the "normal" background image back.jpg is used for the background.
How do I get #777777 as background-color ?


BODY.myclass {FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY: Arial,
Geneva; background-color: #777777; background-image: none;}

--
JayB
Jul 20 '05 #24

P: n/a
Sorry for the redundant reply. I saw this post in alt.html but replies were
set to only go to comp.infosystems.www.authoring.stylesheets. Perhaps if the
OP set the replies to go to all the groups this message was sent to the
responses would be a little more organized.

--
JayB
Jul 20 '05 #25

P: n/a
> When I declare on HTML page

<LINK href="mycss.css" type="text/css" rel=stylesheet />
...
<BODY class=myclass>

in mycss.css

BODY { FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Arial, Geneva; background-image: url(images/back.jpg); }
BODY.myclass { FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY: Arial, Geneva; background-color: #777777; } ...

the background-color in the second declaration is NOT taken but the "normal" background image back.jpg is used for the background.
How do I get #777777 as background-color ?

Probably b/c BODY over-rides BODY.myclass. You have 2 things competing for
the 1 BODY tag.

I'd say an alternative would be to change the 1st BODY class to read
something like BODY.anotherclass and where you don't want a page to display
class=myclass you change it to class=anotherclass

EG:

BODY.anotherclass { FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Arial,
Geneva; background-image: url(images/back.jpg); }

BODY.myclass { FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY: Arial,
Geneva; background-color: #777777; }
Jul 20 '05 #26

P: n/a
rf
Kevin Yu wrote:
BODY { FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Arial, Geneva; background-image: url(images/back.jpg); }
BODY.myclass { FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY: Arial, Geneva; background-color: #777777; }
the background-color in the second declaration is NOT taken
Yes it is. However you also have a background-image. This is being used as
well.
but the "normal" background image back.jpg is used for the background.
Yes.
How do I get #777777 as background-color ?


Specify background-image: none;

--
Cheers
Richard.
Jul 20 '05 #27

P: n/a
Kevin Yu wrote:
When I declare on HTML page

<LINK href="mycss.css" type="text/css" rel=stylesheet />
...
<BODY class=myclass>

in mycss.css

BODY { FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY:
Arial, Geneva; background-image: url(images/back.jpg); }

BODY.myclass { FONT-WEIGHT: bold; FONT-SIZE: 15px; FONT-FAMILY:
Arial, Geneva; background-color: #777777; } ...

the background-color in the second declaration is NOT taken but the
"normal" background image back.jpg is used for the background.

How do I get #777777 as background-color ?

Kevin


Where's the URL? Did you validate your HTML? I can't seem to figure out
if you're using XHTML or HTML. Also, you should get some of the case
straight (you mix a lot). Good luck with the problem. Note that
font-size: 12px is a bit dangerous for certain pixels -- much better to
use relative scaling, but use the default (no definition) for the main
body.

--
Google Blogoscoped
http://blog.outer-court.com
Jul 20 '05 #28

This discussion thread is closed

Replies have been disabled for this discussion.