Search code examples
csswordpresshtml-table

Css changes is only showing when I login to wordpress


I simply applied the below css:

.StandardTable table th {
background: #0098B4 !important;
 color: #ffffff !important;
 text-align: center !important;
}

.StandardTable table tr {
background: #ffffff !important;
 color: #000000 !important;
}


.StandardTable table tr:hover{
    background-color:#1f2326 !important;
    color: #ffffff !important;
}

.StandardTable table, th, td {
    border: 1px solid #dcdcdc;
}
<div class="StandardTable">
<table width="100%">
<thead>
<tr>
<th>Country of Residency</th>
<th>UK</th>
<th>Malta</th>
<th>New Zealand</th>
<th>Australia</th>
<th>Gibraltar</th>
</tr>
</thead>
<tbody>
<tr>
<td>Albania</td>
<td>UK</td>
<td>Local</td>
<td>text</td>
<td>text</td>
<td>text</td>
</tr>
</tbody>
</table>
</div>

I can only see the changes if I log in to Wordpress, if I am just visiting the website as guest, the styles are not showing.

Any ideas, please?


Solution

  • Do you have any caching plugins enabled on your site? Plugins like W3 Total Cache or Comet Cache?

    If so, I would clear the cache using their tools or disable them if not needed.

    You are probably seeing the changes when logged in because most of these plugins disable cache for you if you're signed in to the WP admin.