46 users online (1 members and 45 guests)  


  Results 1 to 3 of 3

Related

  1. validating the checkbox,list/menu..    Forum: Javascript Forum
    Replies: 8
  2. Validating Integer in Javascript    Forum: PHP Forum
    Replies: 2
  3. validating a form    Forum: Javascript Forum
    Replies: 1
  1. #1
    ausammy's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2007
    Posts
    10

    CSS not validating

    Hi the W3C CSS validator shows warnings for my CSS...

    Code:
    118     
       Same colors for color and background-color in two contexts h1 and .footer a:link       118     
       Same colors for color and background-color in two contexts .background and .footer a:link       124     
       Same colors for color and background-color in two contexts .background and .footer a:visited       124     
       Same colors for color and background-color in two contexts h1 and .footer a:visited
    I can't see what the problem is. Here is my CSS... how can I fix it?? Thanks!

    Code:
    /* CSS Document */
    
    
    body {
        margin-top: 0px;
        margin-left: 0px;
        margin-right: 0px;
        background-color: #012E69;
    }
    
    
    .maintext {
        padding-top: 10px;
        padding-left: 10px;
        padding-right: 10px;
        padding-bottom: 10px;
        font-family: Verdana, Arial, Helvetica, sans-serif;
        font-size: 12px;
        top : 0px;
        margin : 0px 25% 0 218px;
        padding : 3px;
        width: 700px;
      
     
    }
    
    .links1 {
        background-image: url(../assets/images/background_images/menu_bg_1.gif);
        background-repeat: repeat-x;
        font-family: Verdana, Arial, Helvetica, sans-serif;
        font-size: 10px;
        white-space: nowrap;
        height: 16px;
        padding-left: 10px;
        padding-top: 4px;
        }
    
    
    .links2 {
        background-image: url(../assets/images/background_images/menu_bg_2.gif);
        background-repeat: repeat-x;
        font-family: Verdana, Arial, Helvetica, sans-serif;
        font-size: 10px;
        white-space: nowrap;
        height: 16px;
        padding-left: 50px;    
        padding-top: 4px;
    }
    
    
    .logo {
        background-image: url(../assets/images/background_images/opr_logo_bg.jpg);
        background-repeat: repeat-x;
        height: 80px;
        white-space: nowrap;
        
    }
    
    .leftbar {
        position : absolute;
        left : 1px;
        width : 150px;
        padding : 5px;
        height: 500px;
        top: 132px;
    }
    
    .background {
        border: solid #012E69 8px;
        height: 500px;
        background-color: #FFFFFF;
    }
    
    
    
    .imgborder {
        border: solid #000000 1px;    
    
    
    
    }
    
    .footer {    
        font-family: Arial, Helvetica, sans-serif;
        font-size: 13px;
        color: #FFCC00;
        font-style: normal;
        letter-spacing: 1px;
            
        
            }
    
    a:link {
        font-family: Verdana, Arial, Helvetica, sans-serif;
        color: #003399;
        text-decoration: none;
        font-weight: bold;
    }
    a:visited {
        font-family: Verdana, Arial, Helvetica, sans-serif;
        color: #003399;
        text-decoration: none;
    }
    a:hover {
        font-family: Verdana, Arial, Helvetica, sans-serif;
        color: #CC0000;
        text-decoration: none;
    }
    a:active {
        font-family: Verdana, Arial, Helvetica, sans-serif;
        color: #003399;
        text-decoration: none;
        }
        
        
    .footer a:link {
        font-family: Verdana, Arial, Helvetica, sans-serif;
        color: #FFFFFF;
        text-decoration: none;
        font-weight:normal;
    }
    .footer a:visited {
        font-family: Verdana, Arial, Helvetica, sans-serif;
        color: #FFFFFF;
        text-decoration: none;
        font-weight:normal;
    }
    .footer a:hover {
        font-family: Verdana, Arial, Helvetica, sans-serif;
        color: #CC0000;
        text-decoration: none;
        font-weight:normal;
    }
    .footer a:active {
        font-family: Verdana, Arial, Helvetica, sans-serif;
        color: #003399;
        text-decoration: none;
        font-weight:normal;
    
        }
        
    h1 {
        font-size: 15px;
        font-weight: bold;
        color: #003399;
        margin-bottom: 2px;
        font-family: "Trebuchet MS";
        letter-spacing: 2px;
        background-color: #FFFFFF;
        border-top: 1px none #CCCCCC;
        border-right: 1px none #CCCCCC;
        border-bottom: 1px solid #FFCC00;
        border-left: 1px none #CCCCCC;
        padding-bottom: 5px;
        
        }
        
    h2 {
        font-family:Verdana, Arial, Helvetica, sans-serif;
        font-size:12px;
        font-weight:bold;
        color: #FF0000;
        }
        
        
    h5 {
        font-weight:bold;
        color: #FF0000;
        font-size: 36px;
    }

  2. #2
    DeadMeatGF's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    381

    Re: CSS not validating

    All it's saying is that you have the same colour on links and visited links for both background and foreground colour - hence making them invisible.
    If you really want them insvisible, but want the code to validate, try using #fffffe as the foreground, and #ffffff as the background.

  3. #3
    ausammy's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2007
    Posts
    10

    Re: CSS not validating

    thankyou!!! fixed ... annoying since the white links are on a blue background!

    sammmy



Tags for this Thread