CSS Question..Why is it...

Discussion in 'Software' started by unclematty, Jan 29, 2004.

  1. unclematty

    unclematty Private First Class

    Why is it that this tag in my stylesheet does not control the background color of my body tag. (btw, my body tag looks like this <body>, its empty)

    body ( margin: 0px 0px 0px 0px;
    background-color: #ff0000;)

    meanwhile, if i take that background-color property out and stick it in the body tag it will work, like this...

    <body style="background-color: #ff0000;">

    Any one know?

    Thanks.
     
  2. Kodo

    Kodo SNATCHSQUATCH

    it should be this

    body {
    margin: 0px;
    background-color: #ff0000;
    }

    you used ( ) to surround your CSS values. need curly braces { }

    you also don't need to do 0px 0px 0px 0px to tell it to zero out all four sides.
    Just do margin: 0px; and it will take care of that.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds