Solved

table question

Posted on 2011-09-20
4
189 Views
Last Modified: 2012-08-13
When my image is false, whole thing shifts, what I need to do prevent that happening?
table.txt
0
Comment
Question by:1jaws
  • 2
4 Comments
 
LVL 17

Expert Comment

by:sonawanekiran
ID: 36571614
Try this.....

<table width="100%" border="0">
        <tr>
            <td>
               sfddf:
            </td>
            <td>
                <asp:Label ID="sss" runat="server"></asp:Label>
            </td>
            <td valign="top">
                <asp:Image ID="imgStamp" runat="server" ImageUrl="~/images/Stamp.gif" Visible="false" />
            </td>
        </tr>
        <tr>
            <td>
                Name:
            </td>
            <td>
                <asp:Label ID="lblName" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                sdfdsf:
            </td>
            <td>
                <asp:Label ID="dsfsdf" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <hr />
            </td>
        </tr>
        <tr>
            <td>
                sdfsdf:
            </td>
            <td>
                <asp:Label ID="fsdf" runat="server"></asp:Label>
            </td>
            <tr>
                <td>
                    xx:
                </td>
                <td>
                    <asp:Label ID="lblxx" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td>
                    yy:
                </td>
                <td>
                    <asp:Label ID="lblyy" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <hr />
                </td>
            </tr>
            <tr>
                <td>
                    ID:
                </td>
                <td valign="top">
                    <asp:Label ID="lblID" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    gdgd:
                </td>
                <td>
                    <asp:Label ID="lbldfgd" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    trtr:
                </td>
                <td>
                    <asp:Label ID="lblMrtr" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    dgag:
                </td>
                <td>
                    <asp:Label ID="dfgdg" runat="server" />
                </td>
            </tr>
            <tr>
                <td valign="top" >
                   cbcvb:
                    <br />
                </td>
                <td valign="top">
                    <asp:Label runat="server" ID="bcvb"   />
                </td>
            </tr>
    </table>

Open in new window

0
 

Author Comment

by:1jaws
ID: 36571639
didnt work.. with image to visible to true it shows a gap between first row and second row.. and without image, still no change
0
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 500 total points
ID: 36571640
Specifiy width in term of percentage and provide colspan wherever required. I gave approximate %  below. Change as per your need.

<table width="100%" border="0">
        <tr>
            <td width="10%">
               sfddf:
            </td>
            <td width="30%">
                <asp:Label ID="sss" runat="server"></asp:Label>
            </td>
            <td rowspan="2" valign="top" width="60%">
                <asp:Image ID="imgStamp" runat="server" ImageUrl="~/images/Stamp.gif" Visible="false" />
            </td>
        </tr>
        <tr>
            <td  width="10%">
                Name:
            </td>
            <td colspan="2">
                <asp:Label ID="lblName" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td width="10%">
                sdfdsf:
            </td>
            <td colspan"2">
                <asp:Label ID="dsfsdf" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td colspan="3">
                <hr />
            </td>
        </tr>
        <tr>
            <td widht="10%">
                sdfsdf:
            </td>
            <td colspan=2>
                <asp:Label ID="fsdf" runat="server"></asp:Label>
            </td>
            <tr>
                <td width="10%">
                    xx:
                </td>
                <td colspan=2>
                    <asp:Label ID="lblxx" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td width="10%">
                    yy:
                </td>
                <td colspan=2>
                    <asp:Label ID="lblyy" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    <hr />
                </td>
            </tr>
            <tr>
                <td width="10%">
                    ID:
                </td>
                <td valign="top" colspan=2>
                    <asp:Label ID="lblID" runat="server" />
                </td>
            </tr>
            <tr>
                <td width="10%">
                    gdgd:
                </td>
                <td colspan=2>
                    <asp:Label ID="lbldfgd" runat="server" />
                </td>
            </tr>
            <tr>
                <td width="10%">
                    trtr:
                </td>
                <td colspan=2>
                    <asp:Label ID="lblMrtr" runat="server" />
                </td>
            </tr>
            <tr>
                <td width="10%">
                    dgag:
                </td>
                <td colspan=2>
                    <asp:Label ID="dfgdg" runat="server" />
                </td>
            </tr>
            <tr>
                <td valign="top" width="10%" >
                   cbcvb:
                    <br />
                </td>
                <td valign="top colspan=2">
                    <asp:Label runat="server" ID="bcvb"   />
                </td>
            </tr>
    </table>
0
 

Author Closing Comment

by:1jaws
ID: 36588781
thanks guys!
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question