Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle APEX 4- to APEX 5 CSS for Alternative Row's colouring

Oku :-Sep 9 2016 — edited Sep 14 2016

Hi Experts ,

Recently we have upgraded our APEX to version 5 , after that custom CSS for Alternative Row colouring is not working .

I know APEX 5 has redesigned so table class  "apexir_WORKSHEET_DATA" is no longer exists , I used  "a-IRR-table" as class name in bellow sample code , but still it is not working .

Can you Please help me to fix this ?

<script type="text/javascript">

// THIS DOES THE STRIPING

function decorateDataGrids (strClass)

{

var tables = document.getElementsByTagName("table");

for (var i=tables.length; i--;)

  {

if (tables.className == strClass) {

var gridRows = tables.getElementsByTagName("tr");

for (var j=gridRows.length; j--;) { if (j%2) { gridRows[j].className = "even"; } }

}

}

}

window.onload = function ()

{

decorateDataGrids("a-IRR-table"); // THIS DOES THE STRIPING

}

</script>

<style>

table.a-IRR-table {

        border-width: 2px;

     border-spacing: 0px;

     border-style: none;

     border-color: black;

     border-collapse: collapse;

}

table.a-IRR-table th {

        border-width: 1px;

     padding: 4px;

     border-style: solid;

     border-color: white;

     background:#4e4e4e;

     font-weight:bold;

     color:#fff;

}

table.a-IRR-table td {

        border-width: 1px;

     padding: 4px;

     border-style: dashed;

     border-color: black;

  

}

/* THIS OVERRIDES APEX'S DEFAULT STYLES */

table.a-IRR-table tr.even td {

background-color:#F2F2F2 !important;

}

table.a-IRR-table td {

background-color:#e2e7f1 !important;

border:1px solid #B3B3A7 !important;

padding:4px 8px !important;

}

</style>

This post has been answered by Oku :- on Sep 14 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 12 2016
Added on Sep 9 2016
1 comment
695 views