#1
  1. No Profile Picture
    rubbish in javascript
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2001
    Location
    London
    Posts
    703
    Rep Power
    14

    defining body css in linked css


    hello

    i have a stylesheet thats linked to my page and i know it works because all the link colours work correctly however the body tag...

    body { color: red; }

    seems to do nothing?? when i put it in the page itself it makes the text of the page go red? i thought this was supposed to be the background colour??

    thanks in advance
    gar
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2002
    Location
    Phoenix
    Posts
    42
    Rep Power
    13

    Re: defining body css in linked css


    Originally posted by Garrett_44
    hello

    body { color: red; }

    seems to do nothing?? when i put it in the page itself it makes the text of the page go red? i thought this was supposed to be the background colour??

    thanks in advance
    gar
    Try body { bgcolor: red; }
  4. #3
  5. No Profile Picture
    rubbish in javascript
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2001
    Location
    London
    Posts
    703
    Rep Power
    14
    i have nothing, its not the attribute ie color, its the body{} tag that seems to not work, nothing in it seems to work, yet i have looked at other sites and they all seem to use it???

    a+
    gar
  6. #4
  7. codegirl
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2002
    Location
    Essex, UK
    Posts
    77
    Rep Power
    13
    In CSS 'color' refers to the text color to set the background color using CSS you want to use:
    Code:
    BODY {background-color: red;}
    If that doesn't work you may have a syntax error somewhere else in the CSS file.

    Hope this helps,
    Mac
    easier is relative
  8. #5
  9. No Profile Picture
    rubbish in javascript
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2001
    Location
    London
    Posts
    703
    Rep Power
    14
    yep found my problem, there was a comment on a preceeding line which was interfering with the body{} tag.

    thanks
    gar

IMN logo majestic logo threadwatch logo seochat tools logo