Div Styling insid td tag - html to xlsx report



  • Hi , I am trying to apply some css styling for div tag inside td tag. but it is not working.

    I want to apply different styling for the Adds and Removes label and featuretypename and name

    <style>
        table, th, td  {
      border: 1px solid black;
    }
    td{
    vertical-align: top;
    }
    table {
      border-collapse: collapse;
    }
      .line-break {
            overflow: scroll;
          
        }
        .adds-label {
        padding: 10px;
        color: #8CC641;
        font-weight: bold;
    }
        
    </style>
    <tr>
            <th>S</th>
            {{#each standardChangesPerProduct}}
                {{#if @first}}
                    <td  class="line-break">
                        {{#each addedFeatures}}                     
                                    <div>{{featureTypeName}}</div>
                                    <div>{{name}}</div>
                            {{/each}}           
                    </td>   
                {{else}}
                    <td  class="line-break">
                        {{#each addedFeatures}}
                            {{#if @first}}
                                    <div style="color:red;"><b>Adds</b></div>
                                    <div> {{featureTypeName}}</div>
                                    <div> {{name}}</div>
                            {{else}}
                                <div> {{featureTypeName}}</div>
                                <div> {{name}}</div>
                            {{/if}}
                        {{/each}}    
                        {{#each removedFeatures}}
                             {{#if @first}}
                             <br />
                                <div class="removes-label">Removes</div>
                                <div>{{featureTypeName}}</div>
                                <div>{{name}}</div>
                            {{else}}
                                <div>{{featureTypeName}}</div>
                                <div>{{name}}</div>
                            {{/if}}
                        {{/each}}          
                    </td>
                {{/if}}   
            {{/each}}         
        </tr>
    

    can you please help me with this



  • Please try to replicate your problem in the playground and share the link back.
    We would take a look. Thank you
    https://playground.jsreport.net/



  • Hi,
    please find the link to my workspace
    https://playground.jsreport.net/w/krishnaraj.s.poojary/q3rNyGnT

    css styling works when I run with the html recipe, but when I change it to html to xlxs, css styling not working


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.