SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2009
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Colors don't show

    I'm just starting to learn some basic html. I'm following the Ian Lloyd book for beginners and I can't get the colors to show as background or as a font color. I'm using IE7. Is there some setting in IE that I need to change?

    The style1.css file works for the fonts but not the color. The style sheet is below:


    Style1.css
    /*
    CSS for Bubble Under Site
    */
    p {
    font-weight: bold;
    color: blue;
    }
    body {
    font-family: Verdana; Helvetica; Arial; sans-serif;
    background-color:#e2dff;
    line-height:125%
    padding:15p
    }
    h1 {
    font-family:"Trabuchet MS", Ariel, Helvetica, San-serif;
    font-size-large
    }
    li {
    font-size:small;
    }
    h2 {
    color:blue;
    font-size:medium;
    font-size:normal;
    }
    p {
    font-size:small
    color:navy:
    }

    Thanks for any help!

  2. #2
    I Love Licorice silver trophybronze trophy Datura's Avatar
    Join Date
    Aug 2006
    Location
    Florida USA
    Posts
    5,774
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    background-color:#e2dff;
    You have to have 6 letters and numbers, a typo
    Ulrike
    TUTs: 1 2 3 4 5 6 7 8 9 10

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2009
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the help - I feel really stupid for not see the typo. But I still am at a loss about the style for the paragraph. Why doesn't the following lead to blue text?

    p {
    font-weight: bold;
    color: blue;
    }

  4. #4
    I Love Licorice silver trophybronze trophy Datura's Avatar
    Join Date
    Aug 2006
    Location
    Florida USA
    Posts
    5,774
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    In the originally posted code you had this: color:navy:

    It needs to be color: navy; -- not a colon but a semicolon.

    You have to watch out for typos, important to stick to the rules
    Ulrike
    TUTs: 1 2 3 4 5 6 7 8 9 10

  5. #5
    SitePoint Member
    Join Date
    Jul 2009
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by azengel View Post
    Thanks for the help - I feel really stupid for not see the typo. But I still am at a loss about the style for the paragraph. Why doesn't the following lead to blue text?

    p {
    font-weight: bold;
    color: blue;
    }
    don't feel stupid, we all start out at the same point, same mistakes. keep on keeping on and good luck w/ everything!

  6. #6
    SitePoint Member
    Join Date
    Jul 2009
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeh actually most php/css errors of mine are also typos. Whether it's leaving out a semicolon, spelling a variable wrong, or some other stupid little mistake. A good text editor to use is either komodo or notepad++, both are free as portable apps.

  7. #7
    SitePoint Enthusiast
    Join Date
    Apr 2009
    Location
    Australia
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One of the most important things I drum into my students is code layout.

    If you keep a consistent code layout (e.g. tabs etc) couple with a Syntax Highlighter. You will spot errors because 'something seems odd'.

    E.g. The colour of some word in your code will be black instead of blue, or the rthymn of the code layout will falter.


Bookmarks

Posting Permissions

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