Reply To: Team Schedule Colors

#5190
Bryan Shepherd
Participant

    So I tried to change the CSS tags from odd, even to home-game, away-game and it didn’t work and I’m wanting to make sure that I did it correctly. Here’s the CSS code that I used:

    /*----------------------------------------------
     * 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 tr:nth-child(away-game) {
    	background-color: #FFFFFF; /* white */
    	color:            #007500; /* green */
    	}
    
    table.mstw-lm-team-schedule_horace-mann-middle-school tr:nth-child(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 tr:nth-child(away-game) a,
    table.mstw-lm-team-schedule_horace-mann-middle-school tr:nth-child(away-game) a:hover,
    table.mstw-lm-team-schedule_horace-mann-middle-school tr:nth-child(away-game) a:visited,
    table.mstw-lm-team-schedule_horace-mann-middle-school tr:nth-child(away-game) a:active {
        color: #007500; /* green */
    }
    
    table.mstw-lm-team-schedule_horace-mann-middle-school tr:nth-child(home-game) a,
    table.mstw-lm-team-schedule_horace-mann-middle-school tr:nth-child(home-game) a:hover,
    table.mstw-lm-team-schedule_horace-mann-middle-school tr:nth-child(home-game) a:visited,
    table.mstw-lm-team-schedule_horace-mann-middle-school tr:nth-child(home-game) a:active {
        color: #FFFFFF; /* white */
    }

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