html - fixed width of div in oracle function -
i have oracle function format mail data before sending. function called pl/sql process in apex. have small problem css formating of mail. want have div fixed width 750px. , table , other elements fit specifed width. problem when define fixed width of div not work. have tried on jsfiddle , works not work in oracle function. when define other div parameter font size, color, border etc. works. not able change width of div. function:
create or replace function "send_mail" return varchar2 pragma autonomous_transaction; kontr_tema varchar2(500); komentar varchar2(2000); obl varchar2 (100); riz varchar2 (1); riz_warning varchar2(100); last_report_id number; vystup varchar2(2601); begin select riziko riz audit_reports report_id = (select max(report_id) audit_reports); select oblast obl audit_reports report_id = (select max(report_id) audit_reports); x in(select opis_kontroly audit_reports report_id = (select max(report_id) audit_reports)) loop komentar := ''||x.opis_kontroly||'<br />'; end loop; x1 in(select kontrolna_tema audit_reports report_id = (select max(report_id) audit_reports)) loop kontr_tema := ''||x1.kontrolna_tema||'<br />'; end loop; vystup := ' <html> <head> <style type="text/css"> div{ position:relative; width:750px; border: 1px solid black; border-collapse: separate; } </style> <style type="text/css"> "table,th,td" { border: 1px solid black; border-collapse: separate; width:100% !important; } </style> </head> <body> <div> <table border = "1"> <tr> <th>oblasť</th> <th>riziko</th> <th>kontrolná téma</th> <th>komentár</th> </tr> <tr> <td>'||obl||'</td> <td>'||riz||'</td> <td>'||kontr_tema||'</td> <td>'||komentar||'</td> </tr> </table> </div> </body> </html> '; return vystup; commit; end;
see this answer. problem not in oracle or in apex, email clients ignore css headers , should avoid them , instead use inline styling e.g.
<div style="width: 750px">...</div>
Comments
Post a Comment