Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Feb 2012
    Posts
    85
    Thanks
    8
    Thanked 0 Times in 0 Posts

    No doubt such a rookie mistake..but why?

    Does anybody know why the background on this HTML file is not turning red? I have linked it to my CSS file and set it to turn the "body" red. I want the entire page background to be red.

    HTML name - index.html
    Code:
    <!doctype html>
    <head>
    	<link rel="stylesheet" type="text/css" href="styles.css"/>
    </head>
    <body>
    
    
    
    
    </body>
    </html>
    CSS name - styles.css
    Code:
    body{
    	background:##FF0000;
    }
    I've tried .body....#body...html... .html.....#html.... also tried background-color:

    Thanks

  • #2
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,335
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Can you post your entire html and css? Better would be a link to your live test site.
    Teed

  • #3
    New Coder
    Join Date
    Feb 2012
    Posts
    85
    Thanks
    8
    Thanked 0 Times in 0 Posts
    That's all it is mate just them two, is it because there is no html code in the body of the file? I just want the background of the html page to be completely red, however for some reason it is not working, I have done it 100 times before but this one just isn't doing it and I can't think why

  • #4
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,335
    Thanks
    5
    Thanked 363 Times in 360 Posts
    lol nevermind. I havent had my coffee. I didnt read your css. It should be

    background-color: #FF0000;

    One pound sign as well.
    Teed

  • Users who have thanked teedoff for this post:

    aaronoafc (02-10-2012)

  • #5
    New Coder
    Join Date
    Feb 2012
    Posts
    85
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Thanks, how did I miss the two # symbols! my bad!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •