Click here to Skip to main content
15,904,348 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

ASP.NET
<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.
Posted
Updated 10-Jul-16 22:13pm

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

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


Hope, it helps :)
 
Share this answer
 
use td align [^]Attribute
HTML
<td colspan="2" align="center">
 
Share this answer
 
HTML
<td colspan="2" style="text-align:center;" >
    <input type="button" value="Generate" onclick="fnValidate();" />
</td>


(or)

HTML
<td colspan="2" align="center">
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900