• Resolved parvinders347

    (@parvinders347)


    Hi,

    I have made many tables that I do not want to show in mobile, so I have written all these codes.

    But this is a very long code, I have to shorten all these codes, Can you tell me a code to shorten all these codes

    @media (max-width: 768px) {
    
    	.tablepress-id-34 {
    		display: none;
    	}
    
    }
    
    @media (max-width: 768px) {
    
    	.tablepress-id-35 {
    		display: none;
    	}
    
    }
    
    @media (max-width: 768px) {
    
    	.tablepress-id-36 {
    		display: none;
    	}
    
    }
    
    @media (max-width: 768px) {
    
    	.tablepress-id-37 {
    		display: none;
    	}
    
    }
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    You could shorten this to

    @media (max-width: 768px) {
    	.tablepress-id-34,
    	.tablepress-id-35,
    	.tablepress-id-36,
    	.tablepress-id-37 {
    		display: none;
    	}
    }

    Regards,
    Tobias

    Thread Starter parvinders347

    (@parvinders347)

    Thank You for the help.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

    Thread Starter parvinders347

    (@parvinders347)

    I have one more question?

    Thread Starter parvinders347

    (@parvinders347)

    How to minimize all these codes again!

    .tablepress-id-39,
    .tablepress-id-39 tbody td {
    	border: none !important;
    }
    
    .tablepress-id-39 .row-2 .column-3 {
    	text-align: right;
    }
    
    .tablepress-id-39 .row-2 .column-2 {
    	text-align: right;
    }
    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    here, the only possibility is

    .tablepress-id-39,
    .tablepress-id-39 tbody td {
    	border: none !important;
    }
    
    .tablepress-id-39 .row-2 .column-2,
    .tablepress-id-39 .row-2 .column-3 {
    	text-align: right;
    }

    Regards,
    Tobias

    Thread Starter parvinders347

    (@parvinders347)

    Thank you so much @tobiasbg

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    you are very welcome!

    Best wishes,
    Tobias

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to minimize all these codes’ is closed to new replies.