www.webdeveloper.com
Results 1 to 9 of 9

Thread: [RESOLVED] Style Help please!

  1. #1
    Join Date
    May 2006
    Posts
    15

    resolved [RESOLVED] Style Help please!

    I am having a bit of a problem. some of the stuff in the paragraph is not showing up the way I want it to.
    here is my CSS.
    Code:
    /* CSS Document */
    body
    {
      background: #ffebcd url(back.jpg) repeat scroll top left;
      font: 10pt sans-serif;
    }
    
    p
    {
      text-align: justify;
      color: #000000;
      
    }
    p:b 
    {
      font-color:blue;
    )
    a
    {
      text-decoration: none;
      color: black;
    }
    
    #head
    {
      margin-bottom: 10px;
      border-bottom: 1px solid black;
      font-size: 9pt;
    }
    
    #head a
    {
      border: 1px solid black;
      background-color: white;
      padding: 5px 5px 0px 5px;
    }
    
    #head a:hover
    {
      background-color: black;
      color: white;
    }
    
    #calendar
    {
      float: right;
      margin-left: 15px;
      font-size: 7pt;
    }
    
    #calendar a:hover
    {
      text-decoration: underline;
    }
    
    #calendar th
    {
      font-size: 9pt;
      background-color: lightBlue;
      border: 1px solid black;
    }
    
    
    #calendar th.prev
    {
      background-color: white;
      border: 1px solid black;
    }
    
    #calendar th.next
    {
      background-color: white;
      border: 1px solid black;
    }
    
    #calendar td
    {
      vertical-align: top;
      text-align: right;
      width: 60px;
      height: 60px; 
      background-color: white;
      border: 1px solid black;
    }
    
    #calendar td.prev
    {
      background-image: url(back.jpg);
    }
    
    #calendar td.next
    {
      background-image: url(back.jpg);
    }
    
    #calendar td.weekend
    {
      background-color: pink;
    }
    
    .date
    {
      float: left;
      font-size: 9pt;
    }			
    
    } 
    */ End of @media group */
    
    
    
    
    
    @media print
    {
    
    body {
      background: #ffebcd url(back.jpg) repeat scroll top left;
      font: 10pt sans-serif;
         }
    
    p
    {
      text-align: justify;
      color: blue;
      font-weight: bold;
    }
    
    a
    {
      text-decoration: none;
      color: black;
    }
    
    #head
    {
      display: nodisplay;
    }
    
    #calendar
    {
      margin-left: 15px;
      font-size: 7pt;
    }
    
    #calendar table
    {
      width: 95%;
    }
    
    #calendar th
    {
      font-size: 9pt;
      background-color: lightBlue;
      border: 1px solid black;
    }
    
    
    #calendar th.prev
    {
      background-color: white;
      border: 1px solid black;
    }
    
    #calendar th.next
    {
      background-color: white;
      border: 1px solid black;
    }
    
    #calendar td
    {
      vertical-align: top;
      text-align: right;
      width: auto;
      height: auto;
      background-color: white;
      border: 1px solid black;
    }
    
    #calendar td.prev
    {
      background-image: url(back.jpg);
    }
    
    #calendar td.next
    {
      background-image: url(back.jpg);
    }
    
    #calendar td.weekend
    {
      background-color: pink;
    }
    
    .date
    {
      float: left;
      font-size: 9pt;
    }
    The problem is this. any of the pages that have <b> tags in the paragraphs are supposed to be blue. its not working
    and for some reason, my server might be messed up in that it is not displaying my pages without having to refresh it a few times. All the pages that go with this CSS are stored under the folder /chamberlain folder.
    jan.html,feb.html and mar.html

    its not working, and I need some help please!

  2. #2
    Join Date
    May 2004
    Location
    FL
    Posts
    3,447
    Instead of using the "b" for bold, try using "strong". Then, use the following:

    Code:
    strong {
      font-color:blue;
    }
    (Also, note that the closing bracket on the "p.b" class is a ")". It should be a "}")
    Lee

    ""Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."" -- Sir Winston Churchill

  3. #3
    Join Date
    Dec 2002
    Location
    Manchester, UK
    Posts
    6,276
    There are two reasons why you aren't getting blue text.
    Code:
    p:b 
    {
      font-color:blue;
    )
    The : is for psuedo-classes, like :focus and :hover (among others). If you want to reference all <b> elements inside a <p> element, you'd do so like this:
    Code:
    p b 
    {
      font-color:blue;
    }
    Also note the used of the correct closing brace, the brackets MUST correspond to each other, you can't mix and match. The incorrect closing bracket is probably why your CSS only seems to work intermittently.

    In future always run your CSS through the CSS Validator, and there's an HTML validator too.

    I also don't see a closing brace for your @print styles.
    Every fight is a food fight when you’re a cannibal.

  4. #4
    Join Date
    Mar 2006
    Posts
    227
    Correct the problems that David pointed out, but also change
    Code:
    font-color: blue;
    to

    Code:
    color: blue;
    There's no "font-color" in CSS.

    --Natalie

  5. #5
    Join Date
    Dec 2002
    Location
    Manchester, UK
    Posts
    6,276
    Oh, embarrassing, I didn't even look at that bit of the code.
    Every fight is a food fight when you’re a cannibal.

  6. #6
    Join Date
    Mar 2006
    Posts
    227
    He he. I can't even tell you how many times I've typed "font-color" in my code. It just seems so logical.

  7. #7
    Join Date
    May 2006
    Posts
    15

    Argghhhhh

    Just about all the code is invalid for the CSS...
    man.

  8. #8
    Join Date
    May 2006
    Posts
    15

    CSS Validator

    Man that thing helps out Immensly! Thank you for adding yet another bookmark to my favorites. By the way, It was for a class assignment,
    I got a 98 on it.
    check it out if you want, its the Chamberlain one.
    http://mysite.verizon.net/golarin214/index.html

  9. #9
    Join Date
    Dec 2005
    Location
    American, living in Toronto, ON. CANADA
    Posts
    6,746
    Quote Originally Posted by Golarin214
    .. It was for a class assignment,...
    Nice!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles