Colspan按钮不工作在桌子上 [英] Colspan for button not working on table

查看:60
本文介绍了Colspan按钮不工作在桌子上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



 <   table     cellpadding   =  5    cellspacing   =  5 >  
< tr >
< td class = Blackfont > 程序名称< / td >
< td class = Blackfont >
< asp:DropDownList ID = ddlProgram < span class =code-attribute> runat = server >
< / asp:DropDownList >
< / td >
< / tr >
< tr >
< td class = Blackfont > 报告的数据< / td >
< td class = Blackfont >
< 输入 < span class =code-attribute> type = text id = txtReportDate runat = server / >
< / td < span class =code-keyword>>
< / tr >
< tr >
< td class = Blackfont > LookBackMonths < / td >
< td class = Blackfont < span class =code-keyword>>
< 输入 类型 = text class = InputZip id = txtLookBack runat = 服务器 / >
< / td >
< / tr >
< tr >
< td class = Blackfont > 差异类型< / td >
< td class = Blackfont >
< asp:DropDownList ID = ddlDiscrepancy runat = server >
< / asp:DropDownList >
< / td >
< / tr >
< tr >
< td class = Blackfont > 会员CIN < / td >
< td class = Blackfont >
< 输入 type = t ext id = txtCin runat = server / >
< / td >
< / tr >
< tr >
< td < span class =code-attribute> colspan = 2 >
< 输入 < span class =code-attribute> type
= button value = 生成 onclick = fnValidate(); / >
< / td >
< / tr >
< / table >





我的输入按钮的colspan不能在左角对齐,只能覆盖2行。



提前致谢;-)



我的尝试:



我尝试了上面没有工作的代码。

解决方案

你已经应用了colspan但没有应用任何规则进行对齐,所以它将采用默认的行为浏览器。



尝试 -

 <   td     colspan   =  2   样式  =  text-align:center;   >  
< input 类型 = 按钮 value = 生成 onclick = fnValidate(); / >
< / td >





希望,它有帮助:)


使用 td align [ ^ ]属性

  <   td     colspan   =  2    align   =  center >  


 < ;   td     colspan  < span class =code-keyword> =  2    style   =  text-align:center;   >  
< 输入 < span class =code-attribute> type = button value = 生成 onclick = fnValidate(); < span class =code-keyword> / >
< / td >



< br $> b $ b(或)



 <   td     colspan   =  2   对齐  =  center > < /跨度> 


Hi all,

<table cellpadding="5" cellspacing="5">
                <tr>
                    <td class="Blackfont">Program Name</td>
                    <td class="Blackfont">
                        <asp:DropDownList ID="ddlProgram" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="Blackfont">Reported Data</td>
                    <td class="Blackfont">
                        <input type="text" id="txtReportDate" runat="server"/>
                    </td>
                </tr>
                <tr>
                    <td class="Blackfont">LookBackMonths</td>
                    <td class="Blackfont">
                        <input type="text" class="InputZip" id="txtLookBack" runat="server"/>
                    </td>
                </tr>
                <tr>
                    <td class="Blackfont">Discrepancy Type</td>
                    <td class="Blackfont">
                        <asp:DropDownList ID="ddlDiscrepancy" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="Blackfont">Member CIN</td>
                    <td class="Blackfont">
                        <input type="text" id="txtCin" runat="server"/>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <input type="button" value="Generate" onclick="fnValidate();" />
                    </td>
                </tr>
            </table>



My colspan for input button is not working its align on left corner only not covering 2 rows.

Thanks in advance;-)

What I have tried:

I tried the above code which is not working.

解决方案

You have applied colspan but haven't applied any rule for alignment so it will be taking default beahavior of the browser.

Try-

<td colspan="2" style="text-align:center;" >
    <input type="button" value="Generate" onclick="fnValidate();" />
</td>



Hope, it helps :)


use td align [^]Attribute

<td colspan="2" align="center">


<td colspan="2" style="text-align:center;" >
    <input type="button" value="Generate" onclick="fnValidate();" />
</td>



(or)

<td colspan="2" align="center">


这篇关于Colspan按钮不工作在桌子上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆