SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    Level 8 Chinese guy Archbob's Avatar
    Join Date
    Sep 2001
    Location
    Somewhere in this vast universe
    Posts
    3,741
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Whats wrong with this css?

    Code:
     .headline {font-family: Verdana,Sans-serif;font-weight: bold;color: #FFFFFF;background-color: #003366;font-size: 11px; a:link, a:visited, a:active { text-decoration: none}}
    The link, visited and active text decorations aren't working, what am I doing wrong.

  2. #2
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    You very much are wrong.

    Code:
    .headline {
    font-family: Verdana,Sans-serif;
    font-weight: bold;
    color: #FFFFFF;
    background-color: #003366;
    font-size: 11px;
    }
    
    a:visited, a:active, a:link {
    text-decoration: none
    }
    That should solve it.

  3. #3
    Level 8 Chinese guy Archbob's Avatar
    Join Date
    Sep 2001
    Location
    Somewhere in this vast universe
    Posts
    3,741
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It still doesn't work. All I want are the links in the headline class to be colored white, this is my full style.css:
    Code:
    <!--
    input,textarea, select,{
     color : #000000;
     font: normal 12px;
     border-collapse: collapse; border: 1px solid #000000;
    }
    .maintable {border: 1px #003366 solid; background-color: #FFFFFF; width: 90%; padding: 0px;font-family: Verdana,Sans-serif;font-size: 12px;} 
    .regrow {font-family: Verdana,Sans-serif; color: #000000; font-weight: bold; background-color: #FFFFFF;} 
    .headline {
    font-family: Verdana,Sans-serif;
    font-weight: bold;
    color: #FFFFFF;
    background-color: #003366;
    font-size: 11px;
    }
    a:visited, a:active, a:link {
    text-decoration: none
    }
    
    .mainrow {font-family: Verdana,Sans-serif; color: #000000;background-color: #F2F2F2;font-size: 14px; a:link, a:visited, a:active { text-decoration: none}} 
    .maintables {border: 1px #003366 solid; background-color: #FFFFFF; width: 120px; padding: 0px;font-family: Verdana,Sans-serif;font-size: 12px;} 
    -->

  4. #4
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    .headline a {
    color: #FFF;
    }

    ^ That is how you would select a link in a specific section.

  5. #5
    CTO htmlguy's Avatar
    Join Date
    Feb 2005
    Location
    North Carolina
    Posts
    420
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking Validate it!

    Click on this link and validate your css online. Validator
    HTMLGuy

  6. #6
    SitePoint Wizard silver trophybronze trophy Nadia P's Avatar
    Join Date
    Oct 2004
    Location
    NSW Australia
    Posts
    3,564
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, you have to be more specific,

    .headline a:visited, .headline a:active, .headline a:link {
    color: #FFF;
    text-decoration: none}

    Nadia

  7. #7
    CTO htmlguy's Avatar
    Join Date
    Feb 2005
    Location
    North Carolina
    Posts
    420
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb I hope...

    I hope you haven't forgotten to put the
    <style type="text/css"></style>
    before and after your code! Just wondering!
    HTMLGuy


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
  •