Problem coloring table rows in print using @ media ASP.NET MVC

In my view the result of my table looks like this:

insert the description of the image here

In print:

insert the description of the image here

I put my used CSS styles in view inside @ @ media as follows:

<style>
    .form-control {
        min-width: 100% !important;
    }

    .p-periodo{
        text-align :left !important;
        margin-left: -1.5% !important;
        margin-top: 3% !important;
    }


    #btnImprimir {
        margin-top: 8% !important;
    } 

    th {
        text-align: center !important;
    }

    .debito {
        color: red;
    }

    .saldo {
        background-color: gainsboro;
    }

    .credito {
        text-decoration-color: black;
    }

    .periodoMensal {
        border: none !important;
        border-style: none !important;
        background-color: dimgray;
        color: white;
    }

    @@media print {

        th {
            text-align: center !important;
        }

        #myContainerPrint{
            margin-top: -10% !important;            
        }

        #btnImprimir {
            display: none !important;
        }

        .debito {
            color: red !important;
        }

        .saldo {
            background-color: gainsboro !important;
        }

        .periodoMensal {
            border: none !important;
            border-style: none !important;
            background-color: dimgray;
            color: white;
        }

        .credito {
            text-decoration-color: black !important;
        }

    }

</style>

What do I need to do so that in printing the colors of the rows in my table are the same as in my view ?

Author: LINQ, 2017-10-31

1 answers

@media print {

}

You are using like this:

@ @ media print {

}

 1
Author: Wesley S., 2017-11-06 14:29:16