Reply To: Team Schedule Colors

#5192
Bryan Shepherd
Participant

    Just before you replied I figured it out. I took out the entire tr:nth-child argument and just changed it to .home-game/.away-game.

    /*----------------------------------------------
     * Styles for the Horace Mann team schedules
     *----------------------------------------------*/	
    table.mstw-lm-team-schedule_horace-mann-middle-school thead tr th {
    	background-color: #007500; /* green */
    	color:            #FFFFFF; /* white */
    	font-weight:      bold;
    	border-top:       1px solid #FFFFFF; /* white */
    	border-bottom:    1px solid #FFFFFF; /* white */
    	}
    	
    table.mstw-lm-team-schedule_horace-mann-middle-school .away-game {
    	background-color: #FFFFFF; /* white */
    	color:            #007500; /* green */
    	}
    
    table.mstw-lm-team-schedule_horace-mann-middle-school .home-game {
    	background-color: #007500; /* green */
    	color:            #FFFFFF; /* white */
    	}
    
    table.mstw-lm-team-schedule_horace-mann-middle-school tbody tr td {
    	border-top:       1px solid #FFFFFF; /* white */
    	border-bottom:    1px solid #FFFFFF; /* white */
    	}
    	
    table.mstw-lm-team-schedule_horace-mann-middle-school a {
        text-decoration: underline;
    }
    
    table.mstw-lm-team-schedule_horace-mann-middle-school a:hover {
        text-decoration: none;
    }
    
    table.mstw-lm-team-schedule_horace-mann-middle-school .away-game a,
    table.mstw-lm-team-schedule_horace-mann-middle-school .away-game a:hover,
    table.mstw-lm-team-schedule_horace-mann-middle-school .away-game a:visited,
    table.mstw-lm-team-schedule_horace-mann-middle-school .away-game a:active {
        color: #007500; /* green */
    }
    
    table.mstw-lm-team-schedule_horace-mann-middle-school .home-game a,
    table.mstw-lm-team-schedule_horace-mann-middle-school .home-game a:hover,
    table.mstw-lm-team-schedule_horace-mann-middle-school .home-game a:visited,
    table.mstw-lm-team-schedule_horace-mann-middle-school .home-game a:active {
        color: #FFFFFF; /* white */
    }

    Result: http://wpress.kcmsathletics.com/baseball/horace-mann-middle-school-baseball/

    For those trying to stumble or are new to CSS, I found a great website that will help: https://www.w3schools.com/cssref/default.asp