nuzula
nuzula

Reputation: 93

Wordpress Same Custom CSS On Multiple Page

How can use the same custom css code on multiple pages in wordpress right now i am using this custom css on this page id 1367 in wordpress and i would like to use these same css on this page id 1699 too

.page-id-1367 table, th, td {
  border: 1px solid black !important;
}

do i need to add like this or any other method is available in wordpress

.page-id-1699 table, th, td {
  border: 1px solid black !important;
}

Upvotes: 2

Views: 209

Answers (2)

sabithkumar
sabithkumar

Reputation: 412

You can add more selectors.. Like,

.page-id-1367 table, th, td, .page-id-1699 table, th, td {}

Upvotes: 0

Yudiz Solutions
Yudiz Solutions

Reputation: 4459

Can you please check the below code? Hope it will work for you. You can give one class to a table so you don't need to inherit every page class like .page-id-1367, .page-id-1699

<table class="common-table">
..
</table>

.common-table,
.common-table th,
.common-table td {
    border: 1px solid black !important;
}

Upvotes: 1

Related Questions