Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / June 2005



Tip: Looking for answers? Try searching our database.

Body css tag doesn't do anything!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jaxon.bridge@gmail.com - 29 Jun 2005 01:44 GMT
I have the following in my css sheet:

body {
    font-family: verdana, arial, sans-serif;
    font-size: 14px;
    line-height: 16px;
    background-color: #7E95F7;
       background-repeat: repeat-y;
    background-position: center;
    margin-top: 0px;
    margin-bottom: 0px;
    text: #BEC8F5;
}

The problem is that ordinary text typed in the body with no other
attributes is not showing up in the color specified above in text:.

I cannot on earth figure out why this is.

Similarly, I can't text colors to work in tables either, even though I
have this:

table, td {
    text: #BEC8F5;
    font-family: verdana, arial, sans-serif;
    font-size: 14px;
    line-height: 16px;
}

... which is the same color.

In both instances, the text will come out black on all browsers.  Other
issues, such as the font size are working fine.  Any ideas?  This is my
first time using css.

Thanks,

Jaxon
mscir - 29 Jun 2005 02:07 GMT
> I have the following in my css sheet:
>
[quoted text clipped - 33 lines]
> Thanks,
> Jaxon

http://www.htmlhelp.com/reference/css/color-background/color.html
Jaxon Bridge - 29 Jun 2005 02:22 GMT
I am clearly not with it, as I have tried both font-color and
text-color with neither do anything to change the color of the body
text from black to my desired choice.

What is the correct syntax to get unspecified text a chosen default
color?

Jaxon
Jaxon Bridge - 29 Jun 2005 02:26 GMT
God, I've tried putting font-color and text-color in the body {} are of
my css, i have also tried putting:

text {
       color: #BEC8F5;
}

and

font {
       color: #BEC8F5;
}

in the css.   I am stumbling in the dark, apparently. Someone help
correct my novice woes.

thanks
Jaxon
Darin McGrew - 29 Jun 2005 03:15 GMT
> God, I've tried putting font-color and text-color in the body {} are of
> my css,

That would specify the (nonstandard) font-color and text-color properties
for the (standard) body element.

> text {
>         color: #BEC8F5;
> }

That would specify the (standard) color property for the (nonstandard) text
element.

> font {
>         color: #BEC8F5;
> }

That would specify the (standard) color property for the (standard, but
deprecated) font element.

>               I am stumbling in the dark, apparently. Someone help
> correct my novice woes.

I think you're trying to set the color property for the body element.

    body {
        color: ... ;
        background: ... ;
        ...
    }
   
I recommend http://westciv.com/style_master/academy/css_tutorial/

See also http://css.nu/faq/ciwas-mFAQ.html#C05
Signature

Darin McGrew, mcgrew@stanfordalumni.org, http://www.rahul.net/mcgrew/
   Web Design Group, darin@htmlhelp.com, http://www.HTMLHelp.com/

"Entering Yosemite National Park: laws of gravity strictly enforced"

mscir - 29 Jun 2005 02:43 GMT
> body {
>     font-family: verdana, arial, sans-serif;
[quoted text clipped - 6 lines]
>     margin-bottom: 0px;
>     /* text: #BEC8F5; */
        color:  #BEC8F5;
> }

> table, td {
>     /* text: #BEC8F5; */
        color:  #BEC8F5;
>     font-family: verdana, arial, sans-serif;
>     font-size: 14px;
>     line-height: 16px;
> }

And you were so close...

Mike
Jaxon Bridge - 29 Jun 2005 02:50 GMT
Thank you very much Mike.
Felix Miata - 29 Jun 2005 04:33 GMT
> I have the following in my css sheet:

> body {
>     font-family: verdana, arial, sans-serif;
[quoted text clipped - 7 lines]
>     text: #BEC8F5;
> }

> The problem is that ordinary text typed in the body with no other
> attributes is not showing up in the color specified above in text:.

> I cannot on earth figure out why this is.

> Similarly, I can't text colors to work in tables either, even though I
> have this:

> table, td {
>     text: #BEC8F5;
[quoted text clipped - 4 lines]
>
> ... which is the same color.

> In both instances, the text will come out black on all browsers.  Other
> issues, such as the font size are working fine.  Any ideas?  This is my
> first time using css.

Run your stylesheet through the validator. Keyword will be "color". Reading
this should also be helpful:
http://www.mozilla.org/docs/web-developer/faq.html#stylenotworking

Before you finish, get rid of "font-size: 14px;". It's half the size of my
default. I cannot read it. If the text on your page is too big for you, it's
because you've neglected to set your default appropriately. Don't assume
your users haven't adjusted to their needs or that you know better what they
need or want.
Signature

"Love does not demand its own way."        1 Corinthians 13:5

 Team OS/2 ** Reg. Linux User #211409

Felix Miata  ***  http://members.ij.net/mrmazda/auth/

Christoph Päper - 29 Jun 2005 21:43 GMT
jaxon.bridge@gmail.com:
> body {
>     font-family: verdana, arial, sans-serif;

Read up on using Verdana. (Don't.)
Read up on specifying 'font-family' at all for general text. (Be
careful. Know what you are doing.)

>     font-size: 14px;

Read up on using 'px' for 'font-size'. (Don't, use 'em', '%' or keywords
instead.)
Read up on specifying 'font-size' at all for general text. (Don't.)

>     line-height: 16px;

Read up on using 'px' for 'line-height'. (Don't, use no unit, which is
similar to 'em' in (and only in) this case.)

>     background-color: #7E95F7;
>       background-repeat: repeat-y;
>     background-position: center;

You seem to have no 'background-image' specified, so the latter two
rules are pretty pointless. Also read up on the 'background' shorthand
property.

>     margin-top: 0px;
>     margin-bottom: 0px;

Note that some browsers use a default 'padding', not 'margin', for 'body'.

>     text: #BEC8F5;

'Color'. The contrast between #BEC8F5 and #7E95F7 is qui^Wtoo low.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.