New class dont work

Discussion in 'CSS' started by obeegoone, Mar 2, 2009.

  1. #1
    Hi in my css i got this

    hei {
    
    font-size:10px;
    color: #ffffff;
    
    }
    Code (markup):

    In my html i got this

    <li> <a href="#" class="hei"> Test Text</a></li>
    Code (markup):
    For some reason text dosent get bigger and text is black and not white :/

    Any idea ?

    Thanks
     
    obeegoone, Mar 2, 2009 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    [color=red].[/color]hei {
    
    font-size:10px;
    color: #ffffff;
    
    }
    Code (markup):
    You forgot the dot,".".

    cheers,

    gary
     
    kk5st, Mar 2, 2009 IP
  3. obeegoone

    obeegoone Peon

    Messages:
    187
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for helping me so quick

    I changed the code to this

    .hei {
    
    font-size:10px;
    color: #ffffff;
    
    }
    Code (markup):

    But still it wont work :(

    Thanks
     
    obeegoone, Mar 2, 2009 IP
  4. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #4
    Then there is something else. Show us the page.

    BTW, did you validate your html markup and your css? The validators catch a lot of silly typos that your eye will miss.

    cheers,

    gary
     
    kk5st, Mar 2, 2009 IP
  5. obeegoone

    obeegoone Peon

    Messages:
    187
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Cant show the page since its not done yet ;)

    Well anyhow i found another problem and solved the other :)

    Here is the guide i followed
    http://www.webdesign.org/web/html-and-css/tutorials/changing-table-background-on-mouseover.1419.html

    Looks like the class is messign up again :/ not sure tought im pretty new to php,css and html

    This is how i want my menu
    [​IMG]

    But mine looks like this
    [​IMG]
    (should not even be blue :/)

    Here is my html

    <table class="hover_table" width="150" cellpadding="3">
      <tr>
        <td><a href="menu1.html">Menu 1</a></td>
      </tr>
      <tr>
        <td><a href="menu2.html">Menu 2</a></td>
      </tr>
      <tr>
        <td><a href="menu3.html">Menu 3</a></td>
      </tr>
      <tr>
        <td><a href="menu4.html">Menu 4</a></td>
      </tr>
    </table>
    
    Code (markup):
    Here is my css

    .hover_table {
      color:#000;
      background-color:#CCC;
      font:Verdana,Arial,Helvetica,sans-serif 10px
    }
    
    .hover_tablen {
      background-color:#999;
      text-decoration:none /* When you normally hover over a
                              link, you get an underline.  It
                              appears that you don't want that. */
    }
    
    Code (markup):
     
    obeegoone, Mar 2, 2009 IP
  6. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Look closely. What is the difference in the declaration (first line) between those two? The second one you added an "n" at the end. What does that do? Nothing I can think of. Why don't you have the :hover pseudo state somewhere?

    To prevent confusing yourself, you might not want the word "hover" in your class name. You might want to call it "interactive_table" or something.
     
    Stomme poes, Mar 3, 2009 IP