Anchor a table

Michael Sterling
Michael Sterling used Ask the Experts™
on
I have a table within a panel. the panel is set to resize with the size of the browser window. i want the table within the panel to stay in the upper left corner. how do i make this happen
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
HainKurtSr. System Analyst

Commented:
any code to share?
Michael SterlingWeb Applications Developer

Author

Commented:
sure...
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="KCMSDmp.master.cs" Inherits="KCMSDmp" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<!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 runat="server">
    <title>Main Page</title>
    <style type="text/css">
    html
        {
            height:100%;
        }
    .panel
        {
            height: 100%;
            width: 100%;
        }
    </style>
    
    <asp:ContentPlaceHolder id="head" runat="server"> </asp:ContentPlaceHolder>
</head>

<body class="panel">
    <form id="form1" runat="server" class="panel">
    <div class="panel">
    <asp:Panel ID="Panel1" runat="server" BackImageUrl="~/Images/bkgrndPtrn2.jpg" 
            cssclass="panel" >
        <asp:Table ID="Table1" runat="server" CellPadding="0" CellSpacing="0" 
            cssclass="panel" align="top">
            <asp:TableRow runat="server">
                <asp:TableCell runat="server">
                    <td>
                        <asp:Image ID="Image2" runat="server" Height="100px" 
                            ImageUrl="images/kcmsdEmblem.jpg" />              
                    </td>
                    <td>              
                        <asp:Image ID="Image1" runat="server" Height="100px" 
                            ImageUrl="images/kcmsdBanner.jpg"/>
                    </td>
                </asp:TableCell>
                <asp:TableCell runat="server">                
                </asp:TableCell>
            </asp:TableRow>
        </asp:Table>
    </asp:Panel>

        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder>
    </div>
    <link rel="Stylesheet" href="Default.css" type="text/css" />
    </form>
</body>
</html>

Open in new window

HainKurtSr. System Analyst

Commented:
also, can you please post html source of this piece...
Announcing the Winners!

The results are in for the 15th Annual Expert Awards! Congratulations to the winners, and thank you to everyone who participated in the nominations. We are so grateful for the valuable contributions experts make on a daily basis. Click to read more about this year’s recipients!

Michael SterlingWeb Applications Developer

Author

Commented:
that's all the html...(above)
Sr. System Analyst
Commented:
it is already on top, and left aligned, but the images are placed in the middle and center of cells...
I dont know what are you trying to do but do this...
<body class="panel">
-->
<body> 

and

<asp:Table ID="Table1" ...
-->
<asp:Table ID="Table1" style="border:solid 1px red;" ...

to see whats happening with table...

Open in new window

Michael SterlingWeb Applications Developer

Author

Commented:
thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial