Tagged: , ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #773306

    Hi Ismael,

    I’m trying to change the width of a table and I found this code you posted here.:

    .page-id-919 .avia-table {
        table-layout: auto;
    }
    
    .page-id-919 .avia-table tr td:nth-child(1) {
        width: 5%;
    }
    
    .page-id-919 .avia-table tr td:nth-child(5) {
        width: 40% !important;
    }

    I tried to make it work on my page (of course I changed the id), using this CSS:

    .page-id-60927 .avia-table-1 {
        table-layout: auto;
    }
    
    .page-id-60927 .avia-table tr td:nth-child(1) {
        width: 7% !important;
    }
    
    .page-id-60927 .avia-table tr td:nth-child(3) {
        width: 7% !important;
    }
    
    .page-id-60927 .avia-table tr td:nth-child(3) {
        width: 7% !important;
    }
    
    .page-id-60927 .avia-table tr td:nth-child(4) {
        width: 7% !important;
    }
    
    .page-id-60927 .avia-table tr td:nth-child(5) {
        width: 7% !important;
    }
    
    .page-id-60927 .avia-table tr td:nth-child(6) {
        width: 7% !important;
    }
    
    .page-id-60927 .avia-table tr td:nth-child(7) {
        width: 7% !important;
    }

    But the widths of the columns won’t change – any hints?

    thank you,
    Ritchie

    #773430

    Hi Ritchie,

    I let Ismael know about this thread. While he hasn’t gotten here yet, I took a look.

    It seems that your class for your page ID is a bit different. Instead of .page-id-60927 it should be .postid-60927 all throughout your code.

    Can you let me know if that fixes it?

    Thank you!
    Sarah

    • This reply was modified 7 years, 8 months ago by Sarah.
    #773438

    Hi Sarah,

    thanks a lot! Works like a charme now.

    greetings,
    Ritchie

    #773455

    You’re welcome, Ritchie! I’ll close this thread now. Do let us know here in the forums if you need additional help.

    Cheers!
    Sarah

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Different widths for table rows’ is closed to new replies.