Table Errors? Re-sizing problems?

Last post 06-13-2008 4:25 PM by hesed4him. 3 replies.

Sort Posts:

  • Table Errors? Re-sizing problems?

    05-20-2008, 2:11 PM
    • Member
      point Member
    • fmwyso
    • Member since 05-20-2008, 6:00 PM
    • Posts 2

    Wierd Problem Hey, I have recently switched to Visual Web Developer because I am interested in asp.net :P. But... There is a small thing that is just annoying the crap out of me...

     

     I have 4 imagebuttons and 4 images under them. All of which are less than 105width ... When i try to re-size my tables to anything less than 210 pixels it shoots back to what it was... I used to be unable to re-size it to less than 800 or so pixels, just plain empty space from one column to the next, but I split a table into 4 and somehow magically that turned the width somehow less and able to change.

       Less confusingly, it has ALOT of empty space that is bothering me... In actual run mode, it doesn't have the same flaw... Instead... When i click my button or something happens, the tables re-shape themselves. As if they are trying to assume an unknown width/height everytime... But i have the table and the image buttons, and the images height/width all defined precisely.

    Here is a gif of how odd it is, I did not change the width or height AT ALL. All I did was merge the 4 rows together, for some reason that causes the width of all the buttons to grow and make the table grow as well... It is annoying the hell out of me, anyone know why on earth it does this and how I can fix it?

     http://img383.imageshack.us/my.php?image=wtfman2ni8.gif

     

    I love tables, in Dreamweaver they were excellent ways to store things and were able to be shaped easily and were always reliable... Is there a good alternative I can use for this? 

  • Re: Table Errors? Re-sizing problems?

    05-22-2008, 3:01 PM
    • Member
      223 point Member
    • hesed4him
    • Member since 05-04-2007, 11:28 PM
    • Deerfield Beach, FL
    • Posts 261

    can you please paste your source code on here

    thanks

    Dont forget to click "Mark as Answer" on the post that helped you. This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
  • Re: Table Errors? Re-sizing problems?

    05-22-2008, 10:41 PM
    • Member
      point Member
    • fmwyso
    • Member since 05-20-2008, 6:00 PM
    • Posts 2

      Ya sure, no problem...

     

    The ASP Code

     

    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
    <title>My Page</title>
    <style type="text/css">
    #form1
    {
    }
    .style14
    {
    width: 179px;
    margin-right: 0px;
    }
    </style>
    </head>
    <body>
    <form id="form1" runat="server">
    <asp:Image ID="Image1" runat="server" Height="250px" Width="900px" EnableTheming="True"
    ImageUrl="~/blackbanner.png" style="margin-right: 0px" />
    <table align="left" cellpadding="0" class="style14">
    <tr>
    <td height="390px" width="105px">
    <asp:ImageButton ID="Home" runat="server"
    ImageUrl="~/black.png" Height="37px" Width="105px" />
    <asp:Image ID="Image2" runat="server" Height="32px"
    ImageUrl="~/shadow.png" Width="105px" />
    <asp:ImageButton ID="News" runat="server"
    ImageUrl="~/black.png" Height="37px" Width="105px" />
    <asp:Image ID="Image3" runat="server" Height="32px" ImageUrl="~/shadow.png" Width="105px" />
    <asp:ImageButton ID="Gallery" runat="server"
    ImageUrl="~/black.png" Height="37px"
    Width="105px" />
    <asp:Image ID="Image4" runat="server" ImageUrl="~/shadow.png"
    Height="32px" Width="105px" />
    <asp:ImageButton ID="About" runat="server"
    ImageUrl="~/black.png" Height="37px" Width="105px" />
    <asp:Image ID="Image5" runat="server" ImageUrl="~/shadow.png"
    Height="32px" Width="105px" />
    </td>
    <td height="390px" width="105px">
    <asp:Image ID="message" runat="server" />
    </td>
    </tr>
    </table>
    </form>
    </body>
    </html>
     
    The VB.net code
     
    Partial Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    End Sub

    Protected Sub
    Home_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles Home.Click
    message.ImageUrl = "~/blackbox.png" message.Height = 500 message.Width = 600 End Sub

    Protected Sub
    News_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles News.Click
    End Sub

    Protected Sub
    Gallery_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles Gallery.Click
    End Sub

    Protected Sub
    About_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles About.Click
    End Sub
    End Class

  • Re: Table Errors? Re-sizing problems?

    06-13-2008, 4:25 PM
    • Member
      223 point Member
    • hesed4him
    • Member since 05-04-2007, 11:28 PM
    • Deerfield Beach, FL
    • Posts 261

    First, you only have ONE table cell defined and its width is 105px.  Are you wanting all 8 images (4 imagebuttons, 4 image controls) to be vertically aligned? If so, you'd be better off creating an individual table row/table cell for each image.  If you want all the buttons to be horizontal, then you need to create individual table cells for each and put the shadow on the next table row.

    Second, the reason you have all of the extra space is because the blackbanner.png has a width of 900px - this sets the dimensions of the content palette.  Then you align your table left while settiing your table's right margin to 0px.  This will stretch the table 900px (the entire width of your content).

     Hope this helps.

    Dont forget to click "Mark as Answer" on the post that helped you. This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
Page 1 of 1 (4 items)