代码之家  ›  专栏  ›  技术社区  ›  CRaw

表格中的标题文本对齐:前2个单元格左对齐,后3个单元格右对齐

  •  0
  • CRaw  · 技术社区  · 2 年前

    我有下表,只想更改标题行中的文本对齐方式,以便标题行的前两个单元格为文本对齐:左,标题行的最后三个单元格为文本对齐:右。其目的是确保标题文本始终与表格正文中的文本对齐。请帮忙!

    <style type="text/css">table.table591{ border-collapse: collapse; border: none; font-family: arial unicode ms, sans-serif; font-size: 8.25pt; width: 100%;margin-top: 15px;}
        .table591header{font-size: 10px;
            text-align: center      
            padding: 5px 5px;
            color: #5D6975;
            border-bottom: 1px solid #C1CED9;
            white-space: nowrap;
            font-weight: normal;}
        .table591footer{font-size: 9.25pt; border-top:solid #C1CED9 1px;text-align:right;}
        .table591col0{text-align:center;font-size: 11pt; background: #F5F5F5;border-top:solid black 1px;border-bottom:solid black 1px;}
        .table591col1{text-align:left; vertical-align: top;border-bottom: 1px solid #F2F5F7;}
        .table591col2{text-align:left; vertical-align: top;border-bottom: 1px solid #F2F5F7;}
        .table591col3{text-align:right;font-size: 8.75pt;border-bottom: 1px solid #F2F5F7;}
        .table591col4{text-align:right;font-size: 8.75pt;border-bottom: 1px solid #F2F5F7;}
        .table591col5{text-align:right;font-size: 8.75pt;border-bottom: 1px solid #F2F5F7;}
        </style>
        <table class="table591">
            <tbody>
                <tr>
                    <td colspan="5" style="font-size: 9pt; padding-bottom: 15px;">INVOICE DETAILS</td>
                </tr>
                <!--{{!
        <lineitemsSOQL><class>table591</class>
        <listname>quotelineitem</listname>
        <column>PricebookEntry.Product2.family</column>
        <column>PricebookEntry.Product2.name</column>
        <column>PricebookEntry.Product2.description</column>
        <column prefix="$" format-number="#,###.##">unitprice</column>
        <column format-number="#,###">quantity</column>
        <column prefix="$" format-number="#,###.##">totalprice</column>
        <where>quoteid='{!ObjectID15}'</where>
        <groupbyheader position="after-group">SERVICE,DESCRIPTION,PRICE,QTY,TOTAL</groupbyheader>
        <groupby type="onetable">PricebookEntry.Product2.family</groupby>
        <groupbysum position="footer" format-number="#,###.##" prefix="Subtotal $">totalprice</groupbysum>
        <orderby>PricebookEntry.Product2.family, sortorder, createddate desc</orderby>
        </lineitemsSOQL>
        }}-->
                <tr>
                    <td colspan="4"> </td>
                </tr>
                <tr>
                    <td colspan="2"> </td>
                    <td colspan="2">GRAND TOTAL</td>
                    <td style="border-top: 1px solid #5D6975;">${{!quote.opportunity.amount #,###.##}}</td>
                </tr>
            </tbody>
        </table>
    <style type="text/css">table.table591{ border-collapse: collapse; border: none; font-family: arial unicode ms, sans-serif; font-size: 8.25pt; width: 100%;margin-top: 15px;}
    .table591header{font-size: 10px;
        text-align: center
        padding: 5px 5px;
        color: #5D6975;
        border-bottom: 1px solid #C1CED9;
        white-space: nowrap;
        font-weight: normal;}
    .table591footer{font-size: 9.25pt; border-top:solid #C1CED9 1px;text-align:right;}
    .table591col0{text-align:center;font-size: 11pt; background: #F5F5F5;border-top:solid black 1px;border-bottom:solid black 1px;}
    .table591col1{text-align:left; vertical-align: top;border-bottom: 1px solid #F2F5F7;}
    .table591col2{text-align:left; vertical-align: top;border-bottom: 1px solid #F2F5F7;}
    .table591col3{text-align:right;font-size: 8.75pt;border-bottom: 1px solid #F2F5F7;}
    .table591col4{text-align:right;font-size: 8.75pt;border-bottom: 1px solid #F2F5F7;}
    .table591col5{text-align:right;font-size: 8.75pt;border-bottom: 1px solid #F2F5F7;}
    </style>
    <table class="table591">
        <tbody>
            <tr>
                <td colspan="5" style="font-size: 9pt; padding-bottom: 15px;">INVOICE DETAILS</td>
            </tr>
            <!--{{!
    <lineitemsSOQL><class>table591</class>
    <listname>quotelineitem</listname>
    <column>PricebookEntry.Product2.family</column>
    <column>PricebookEntry.Product2.name</column>
    <column>PricebookEntry.Product2.description</column>
    <column prefix="$" format-number="#,###.##">unitprice</column>
    <column format-number="#,###">quantity</column>
    <column prefix="$" format-number="#,###.##">totalprice</column>
    <where>quoteid='{!ObjectID15}'</where>
    <groupbyheader position="after-group">SERVICE,DESCRIPTION,PRICE,QTY,TOTAL</groupbyheader>
    <groupby type="onetable">PricebookEntry.Product2.family</groupby>
    <groupbysum position="footer" format-number="#,###.##" prefix="Subtotal $">totalprice</groupbysum>
    <orderby>PricebookEntry.Product2.family, sortorder, createddate desc</orderby>
    </lineitemsSOQL>
    }}-->
            <tr>
                <td colspan="4"> </td>
            </tr>
            <tr>
                <td colspan="2"> </td>
                <td colspan="2">GRAND TOTAL</td>
                <td style="border-top: 1px solid #5D6975;">${{!quote.opportunity.amount #,###.##}}</td>
            </tr>
        </tbody>
    </table>
    
    0 回复  |  直到 2 年前