How to apply a box shadow in col html tag?

Here, I have a table created by a for loop in twig, and I would like to apply to a colone a shaow. That is to say, when the settler in the class “sleected” he defrauded him applied a box-shadow. But this does not work :/

My twig code:

{% set title= "Nos offres Minecraft - DataHosting" %}
{% set description = "Venez découvrir nos offres minecraft 100% gratuites à vie et performante. Vous n'avez pas besoin de débourser 1 centime !" %}
{% set org_url = url('offre_minecraft') %}

{% extends "site/baseSite.html.twig" %}

{% block content %}
    <div class="table-responsive">
    <table class="table table-striped-col table-light">
        <colgroup>
            <col>
            {% for product in list_product %}
            <col {{ (app.request.get("offre") is defined and app.request.get("offre") == product.id) ? 'class="seleted_offre"' : "" }}>
            {% endfor %}
        </colgroup>
        <thead>
        <tr>
            <th></th>
            {% for product in list_product %}
                <td class="text-center" width="210px"><strong>SERVEUR MINECRAFT {{ product.info.name | raw }}</strong></td>
            {% endfor %}
        </tr>
        </thead>
        <tbody>
        <tr>
            <th scope="row">NOMBRE DE JOUEURS</th>
            {% for product in list_product %}
                <td class="text-center">{{ product.info.maxplayers }}</td>
            {% endfor %}
        </tr>
        <tr>
            <th scope="row">MÉMOIRE RAM</th>
            {% for product in list_product %}
                <td class="text-center">{{ product.info.ram }}</td>
            {% endfor %}
        </tr>
        <tr>
            <th scope="row">NOMBRE DE VCPU</th>
            {% for product in list_product %}
                <td class="text-center">{{ product.info.vcpu }}</td>
            {% endfor %}
        </tr>
        <tr>
            <th scope="row">ESPACE DIQUE (SSD)</th>
            {% for product in list_product %}
                <td class="text-center">{{ product.info.disk }}</td>
            {% endfor %}
        </tr>

        <tr>
            <th scope="row">IP PERSONNALISABLE</th>
            {% for product in list_product %}
                <td class="text-center">
                    {% if product.info.ipperso %}
                        <i class="fas fa-check" style="color: green;"></i>
                    {% else %}
                        <i class="fas fa-times" style="color: red;"></i>
                    {% endif %}
                </td>
            {% endfor %}
        </tr>

        <tr>
            <th scope="row">PORT DÉDIÉE</th>
            {% for product in list_product %}
                <td class="text-center">{{ product.info.portperso }}</td>
            {% endfor %}
        </tr>

        <tr>
            <th scope="row">SAUVEGARDES AUTOMATISÉES</th>
            {% for product in list_product %}
                <td class="text-center">
                    {% if product.info.autosave %}
                        <i class="fas fa-check" style="color: green;"></i>
                    {% else %}
                        <i class="fas fa-times" style="color: red;"></i>
                    {% endif %}
                </td>
            {% endfor %}
        </tr>

        <tr>
            <th scope="row">NOMBRE DE SAUVEGARDES</th>
            {% for product in list_product %}
                <td class="text-center">{{ product.info.maxsave }}</td>
            {% endfor %}
        </tr>
        <tr>
            <th scope="row">VERSIONS DE MINECRAFT</th>
            {% for product in list_product %}
                <td class="text-center">{{ product.info.version }}</td>
            {% endfor %}
        </tr>

        <tr>
            <th scope="row">BASE DE DONNÉES</th>
            {% for product in list_product %}
                <td class="text-center">
                    {% if product.info.mysql %}
                        <i class="fas fa-check" style="color: green;"></i>
                    {% else %}
                        <i class="fas fa-times" style="color: red;"></i>
                    {% endif %}
                </td>
            {% endfor %}
        </tr>

        <tr>
            <th scope="row">SUPPORT</th>
            {% for product in list_product %}
                <td class="text-center">
                {% if product.info.support_txt is defined %}
                    {{ product.info.support }}
                {% elseif product.info.support %}
                    <i class="fas fa-check" style="color: green;"></i>
                {% else %}
                    <i class="fas fa-times" style="color: red;"></i>
                {% endif %}
                </td>
            {% endfor %}
        </tr>
        <tr>
            <th>PRIX</th>
            {% for product in list_product %}
                <td class="text-center">{{ product.price }} DC</td>
            {% endfor %}
        </tr>
        <tr>
            <th>DISPONIBLE</th>
            {% for product in list_product %}
                <td class="text-center"><strong>
                {% if product.price == 0 %}
                    {{ free }}
                {% else  %}
                    {{ (avaliable//product.spec.ram) }}
                {% endif %}
                </strong></td>
            {% endfor %}
        </tr>
        <tr>
            <th></th>
            {% for product in list_product %}
                <td><button class="btn {{ product.btn }}" style="color: ghostwhite" onclick="addCart('{{ path('add_cart', {id: product.id }) }}', {{ loop.index }})">Ajouter au panier !</button></td>
            {% endfor %}
        </tr>
        </tbody>
    </table>
    </div>
    {% for product in list_product %}
    <div class="modal" tabindex="-1" role="dialog" id="continue_or_not{{ loop.index }}">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">Serveur ajouté !</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <p>Le serveur {{ product.info.name | raw }} à bien été ajouté à votre panier ! <br />Souhaitez-vous d'autres services ?</p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary" data-dismiss="modal">Continuer !</button>
                    <a class="btn btn-success" href="{{ path('cart') }}">Voir mon panier !</a>
                </div>
            </div>
        </div>
    </div>
    {% endfor %}
{% endblock %}

{% block javascripts %}
<script type="text/javascript">
    //Checkout ?
    function addCart(url, index) {
        fetch(url);
        $("#continue_or_not" + index).modal("show");
    }
</script>
{% endblock %}

The only code that can be ready is this:

td:first-child,th:first-child{
  box-shadow: -15px 0 15px -15px inset;
}

But it displays only line by line, and it is not very beautiful.

Thank for your help !

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *