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 3 of 3
  1. #1
    New Coder
    Join Date
    Feb 2012
    Posts
    41
    Thanks
    31
    Thanked 2 Times in 2 Posts

    I'm just not seeing it

    Can someone please tell me what I've done wrong here?
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
            "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head><link rel="stylesheet" type="text/css" href="main.css" />
    </head>
    <title></title>
    <body>
    
    This is <em>white</em> text on a<strong> black</strong> background
    
    
    
    </body>
    </html>
    Code:
    body {
    	background; #000000;
        color: #FFFFFF;
    }
    It's gotta be something simple that I'm overlooking. I'm not a COMPLETE noob to CSS but I'm not advanced either. It's not showing up in any browser that I use. I just get a blank white page.
    And have I not told you that what you mistake for madness is but over-acuteness of the sense? - now, I say, there came to my ears a low, dull, quick sound, such as a watch makes when enveloped in cotton. ~Edgar Allan Poe

  • #2
    Regular Coder
    Join Date
    Apr 2010
    Location
    Somerset,UK
    Posts
    138
    Thanks
    10
    Thanked 1 Time in 1 Post
    Hi
    your CSS code isnt quite right. You have a ; after background on the css. there should be a :

    Try changing the css to

    Code:
    background-color:#000;
    color:#FFF;
    That should give you a black background with white text.
    Hope that helps!
    C
    Last edited by claire_t; 03-06-2012 at 04:51 PM.
    Hmmmm......scratchy head time......

  • #3
    New Coder
    Join Date
    Jan 2012
    Posts
    97
    Thanks
    1
    Thanked 13 Times in 13 Posts
    Quote Originally Posted by zigvab75 View Post

    Code:
    body {
    	background; #000000;
        color: #FFFFFF;
    }
    Look at your syntax I highlighted your mistake in red.


  •  

    Posting Permissions

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