JSF myfaces dataTable , how to avoid NBSP; tags in the TDs

Posted by Peter on Stack Overflow See other posts from Stack Overflow or by Peter
Published on 2011-01-07T13:25:06Z Indexed on 2011/01/08 19:53 UTC
Read the original article Hit count: 219

Filed under:
|
|
|
|

Hi,

I have style applied to the TD elements of the dataTable of my myfaces application.

td.financialReportTd {
    font-family: Arial;
    font-size: 12px;
    line-height: 12px;
    color:black;
    background-color: white;
        padding-right: 5px;
    text-align: right;
    border:0px black solid;
    height: 30px;
    padding-top:4px;
    padding-left:4px;
    vertical-align: top;
    direction: rtl;
}

Output:

<td class="financialReportTd">
    &nbsp;&nbsp;&nbsp;&nbsp;         
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          

    &nbsp;&nbsp;&nbsp;&nbsp;MY TEXT
</td>

No matter what I try, those NBSP tags fill up the TD and position of the text changes to the worse.

I tried style text-align:right; (I need RTL text), I tried direction: rtl; Nothing helps.

How can I align my text to the very right of the TD and avoid those space tags?

© Stack Overflow or respective owner

Related posts about html

Related posts about jsf