Tagged: , ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #194942

    Hi,
    I bought Enfold a few days ago, it’s a very nice theme!

    I want to style a specific table.
    How can i change the default settings like:
    – background color
    – i want to change the color of the 2nd, 4th etc row also
    – i want the same font type and size (12px) for the whole table
    – i want the same padding and margin for all cells (5px)

    I tried to add an id to the table, and add “quick CSS” but its not working.

    #194944
    This reply has been marked as private.
    #195494

    Hey!

    To alter the styles:

    
    /* This will make the table red */
    .wpcf7 table {
        background: red !important;
    }
    /* This will make the second row blue */
    .wpcf7 table tr:nth-child(2){
        background: blue !important;
    }
    /* This will make the forth row orange */
    .wpcf7 table tr:nth-child(4){
        background: orange !important;
    }
    /* This will set a padding of 5px for all the table cells */
    .wpcf7 table td{
        padding: 5px;
    }
    .wpcf7 table *{
        font-size: 12px; /* This will set a 12px font size */
        font-family: serif; /* This will set the font-family to serif  */
        background: transparent !important;
    }

    Regarding making it responsive, that won’t be possible using conventional tables, however you could use Advanced Layout Builder tables for that.

    Cheers,
    Josue

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Table styling’ is closed to new replies.