Apache Apache -4 years ago 51
CSS Question

CSS styling for table inside textarea

I'm retrieving data from database and display it inside textarea in table format, I try to apply CSS styling for table inside textarea but no effect, does any one know or done this before, please advise, I'm using Javascript editor to the display more like word so user can format the document,

<style type="text/css">
table { }
td,th { white-space:nowrap; padding:3px;color: red; }
.test {
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
color: red; }

<table width="120%" border="0" cellpadding="0" cellspacing="1">
<td width=100% valign="top" class="test">Test
<textarea name="txt_letter_body" style="width=100%" rows="50" > <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign=top>
<td class="test">Data</td>
<td align=left colspan=3><font face="Arial, Helvetica, sans-serif" size=3 ></font></td>
<tr valign=top>
<td colspan=3><hr noshade size=1 color=#000000></td>

Is it any possible to apply css for table inside textarea.

Answer Source

finally i found 1 solution, i just add style attributes into table after textarea, which as below

<table width="100%" border="0" style="font-family: arial;">
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download