• Resolved Quest The Wordsmith

    (@quest-the-wordsmith)


    Hey Tobias,

    Hope your baseball is going well! I have some custom CSS and at the moment I’m only using ONE table on my website. Here is that CSS code:

    /*Font color for table and table border color, vertical align contents*/
    .tablepress,
    .tablepress tbody td,
    .tablepress thead th,
    .tablepress tfoot th {
    	border: 2px solid black;
    	color: white;
    	vertical-align: middle;
    }
    
    /*table hearder & footer dark blue color & font styling*/
    .tablepress thead th,
    .tablepress tfoot th {
    	background-color: #212121;
    	font-size: 22px;
    	font-style: italic;
    }
    
    /*table bg color transparent black*/
    .tablepress tbody {
    	background-color: rgba(0,0,0,0.6);
    }
    
    /*centered text in certain columns*/
    .tablepress .column-2,
    .tablepress .column-3,
    .tablepress .column-4,
    .tablepress .column-5,
    .tablepress .column-6 {
    	text-align: center;
    }
    
    /*colum widths*/
    .tablepress .column-1 {
    /*Name*/
    	width: 120px;
    }
    
    .tablepress .column-4 {
    /*Genre*/
    	width: 125px;
    }
    
    .tablepress .column-5 {
    /*MP3*/
    	width: 110px;
    }
    
    /*table padding*/
    .tablepress td,
    .tablepress th {
    	padding: 5px;
    }

    Any way that I can have all that code affect just a specific table? I’d like to have other tables on my site now without this code affecting them. Thanks!

    http://wordpress.org/plugins/tablepress/

Viewing 1 replies (of 1 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for the question. How are things in New York?

    Sure, that’s easy. Just replace all occurances of

    .tablepress

    with the ID based selector

    .tablepress-id-123

    where 123 is the ID of the table. For more, please see the section “CSS selectors” in the TablePress Documentation at http://tablepress.org/documentation/

    Regards,
    Tobias

Viewing 1 replies (of 1 total)
  • The topic ‘Custom CSS to affect specific tables?’ is closed to new replies.