• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

AAC ignore css in a specific <tr>

Lurk

Active Member
Joined
Dec 4, 2017
Messages
336
Reaction score
48
I have this tr
PHP:
<tr style="background-color:'.($count % 2 ? 'rgba(241, 224, 198, 0.6)' : 'rgba(212, 192, 161, 0.6)').';" >
but the colors don't apply ever because on my css
CSS:
table tr th, table tr td {
  background: #555555;
  /*color: #FFF; */
  color: skyblue;
  padding: 7px 4px;
  text-align: left;
}

tr.yellow td {
  background: rgb(89, 10, 10);
  padding: 7px 4px;
  text-align: left;
}

table tr td {
  background: rgb(212, 192, 161);
  /*color: #FFF; */
  border-top: 1px solid #FFF;
}
removing this is not an option since the entire site uses this. I tried some of that #foo input:not(.ignoreCss) but it doesn't work.

I'm using znote's tibiacom layout
 
Last edited:
Solution
Weird, inline style should override stylesheets.
Try
CSS:
table tr:not(.customTable) th, table tr:not(.customTable) td {
  background: #555555;
  /*color: #FFF; */
  color: skyblue;
  padding: 7px 4px;
  text-align: left;
}

tr:not(.customTable).yellow td {
  background: rgb(89, 10, 10);
  padding: 7px 4px;
  text-align: left;
}

table tr:not(.customTable) td {
  background: rgb(212, 192, 161);
  /*color: #FFF; */
  border-top: 1px solid #FFF;
}
and add class="customTable" to the <tr>
like
HTML:
<tr class="customTable" style="background-color:'.($count % 2 ? 'rgba(241, 224, 198, 0.6)' : 'rgba(212, 192, 161, 0.6)').';" >
Are you using MyAcc?
Post automatically merged:

For MyAcc, you add in config.local.php next config for disable cache?

PHP:
$config['env'] = 'dev'; // dev or prod
 
Maybe trying with !important
PHP:
<tr style="background-color:'.($count % 2 ? 'rgba(241, 224, 198, 0.6)!important' : 'rgba(212, 192, 161, 0.6)!important').';" >
 
yes! the problem seems to be that th, table, tr, td are already defined on my css file so nothing ever applies there
I can't change or remove it because everything else on the website uses it but removing it to test I can see that it actually works and the collors change
 
Weird, inline style should override stylesheets.
Try
CSS:
table tr:not(.customTable) th, table tr:not(.customTable) td {
  background: #555555;
  /*color: #FFF; */
  color: skyblue;
  padding: 7px 4px;
  text-align: left;
}

tr:not(.customTable).yellow td {
  background: rgb(89, 10, 10);
  padding: 7px 4px;
  text-align: left;
}

table tr:not(.customTable) td {
  background: rgb(212, 192, 161);
  /*color: #FFF; */
  border-top: 1px solid #FFF;
}
and add class="customTable" to the <tr>
like
HTML:
<tr class="customTable" style="background-color:'.($count % 2 ? 'rgba(241, 224, 198, 0.6)' : 'rgba(212, 192, 161, 0.6)').';" >
 
Solution
Back
Top