New Landing How can we help? Themeforest Theme Support Dante Table content vertical alignment

Viewing 7 posts - 1 through 7 (of 7 total)
  • Posted in: Dante
  • #186650
    CTMaster
    Member
    Post count: 22

    How do I get all the text in a table to align vertically to the top rather then align vertically as shown in the default?

    Thank you.

    #186652
    CTMaster
    Member
    Post count: 22

    I also wondered how I could apply a color to individual columns.

    #186774
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,

    Please provide me specific page url with issue.

    Thanks 🙂
    With Best Regards
    Mohammad

    #186971
    CTMaster
    Member
    Post count: 22
    This reply has been marked as private.
    #187352
    David Martin – Support
    Moderator
    Post count: 20834

    Hey,

    This CSS should answer all three queries you have:

    table.sf-table {
    	line-height: 1.5;
    }
    
    table td {
    	vertical-align: top;
    }
    
    /*  Define the background color for all the ODD table columns  */
    table tr td:nth-child(odd) { 
    	background: #cccccc;
    }
    
    /*  Define the background color for all the EVEN table columns  */
    table tr td:nth-child(even) {
    	background: #ffffff;
    }

    Thanks,
    David.

    #188634
    CTMaster
    Member
    Post count: 22

    Awesome, thank you so much! Is there a way I can have each column a different color? So not have all the odd the same color and all the even the same color?

    #188636
    David Martin – Support
    Moderator
    Post count: 20834

    Sure, it depends how complex you want the CSS to be – but you can replace the odd even with numbers, these would represent the column number. Column 1, 2, 3, 4 ect.

    Example – 3rd column:

    table tr td:nth-child(3) { 
    	background: red;
    }

    Thanks.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register