ralphisnow
11-02-2006, 07:48 PM
I am creating a website. When I display the website in a browser, the website is too wide. There will be a scroll bar at the bottom of the page. I can move it over very far.
I need to fix this problem, because if I try to align my images in the middle of the screen, they are still off to far to the right.
Here is the code I am using. If you wish to look at the code, you might want to just copy the code and put it in a text file so that it is more readable.
<%@ Control CodeBehind="DesktopBanner.ascx.cs" Language="c#" AutoEventWireup="false" Inherits="thecorprate.PropertyAvail.UI.DesktopBanner" %>
<HEAD>
</HEAD>
<LINK href="style/property.css" type="text/css" rel="stylesheet">
<table class="HeadBg" cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr>
<td noWrap align="left" width="30%" bgColor="#336666"><a href="http://www.thecorpratesite.com"><IMG src="images/header_curve_wide.gif" align="top" border="0"></a>
</td>
</tr>
<tr>
<td noWrap align="left" width="30%" bgColor="white"><a href="http://www.thecorpratesite.com"><IMG src="images/thecorprate_logo_transparent.gif" align="top" border="0"></a>
</tr>
<tr>
<td noWrap align="left" width="30%" bgColor="white"><a href="http://www.thecorpratesite.com"><IMG src="images/propsearch_header.jpg" align="top" border="0"></a>
</tr>
<tr>
<td background="images/dots_horz.gif" colSpan="2"><IMG height="3" alt="" src="images/spacer.gif" width="1" border="0"></td>
</tr>
<tr>
<td bgColor="white" colSpan="2">
<table cellSpacing="0" cellPadding="0" width="100%" bgColor="white" border="0">
<tr>
<td vAlign="middle">
<table>
<tr>
<td><IMG src="images/dot_spc.gif" align="middle" border="0"></td>
<td align="left" width="80"><asp:hyperlink id="hlNewSearch" runat="server" CssClass="normal" NavigateUrl="none" Visible="False">New Search</asp:hyperlink></td>
<% if(hlSearchOtherRegion.Visible){ %>
<td><IMG src="images/dot_spc.gif" align="middle" border="0"></td>
<% } %>
<td align="left" width="200"><asp:hyperlink id="hlSearchOtherRegion" runat="server" CssClass="normal" NavigateUrl="none" Visible="False">Search North America Properties</asp:hyperlink></td>
<% if(hlClose.Visible){ %>
<td><IMG src="images/dot_spc.gif" align="middle" border="0"></td>
<% } %>
<td><asp:hyperlink id="hlClose" runat="server" CssClass="normal" NavigateUrl="javascript:window.close();"
Visible="False" Enabled="True">Close Window</asp:hyperlink></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td background="images/dots_horz.gif" colSpan="2"><IMG height="3" alt="" src="images/spacer.gif" width="1" border="0"></td>
</tr>
</table>
I need to fix this problem, because if I try to align my images in the middle of the screen, they are still off to far to the right.
Here is the code I am using. If you wish to look at the code, you might want to just copy the code and put it in a text file so that it is more readable.
<%@ Control CodeBehind="DesktopBanner.ascx.cs" Language="c#" AutoEventWireup="false" Inherits="thecorprate.PropertyAvail.UI.DesktopBanner" %>
<HEAD>
</HEAD>
<LINK href="style/property.css" type="text/css" rel="stylesheet">
<table class="HeadBg" cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr>
<td noWrap align="left" width="30%" bgColor="#336666"><a href="http://www.thecorpratesite.com"><IMG src="images/header_curve_wide.gif" align="top" border="0"></a>
</td>
</tr>
<tr>
<td noWrap align="left" width="30%" bgColor="white"><a href="http://www.thecorpratesite.com"><IMG src="images/thecorprate_logo_transparent.gif" align="top" border="0"></a>
</tr>
<tr>
<td noWrap align="left" width="30%" bgColor="white"><a href="http://www.thecorpratesite.com"><IMG src="images/propsearch_header.jpg" align="top" border="0"></a>
</tr>
<tr>
<td background="images/dots_horz.gif" colSpan="2"><IMG height="3" alt="" src="images/spacer.gif" width="1" border="0"></td>
</tr>
<tr>
<td bgColor="white" colSpan="2">
<table cellSpacing="0" cellPadding="0" width="100%" bgColor="white" border="0">
<tr>
<td vAlign="middle">
<table>
<tr>
<td><IMG src="images/dot_spc.gif" align="middle" border="0"></td>
<td align="left" width="80"><asp:hyperlink id="hlNewSearch" runat="server" CssClass="normal" NavigateUrl="none" Visible="False">New Search</asp:hyperlink></td>
<% if(hlSearchOtherRegion.Visible){ %>
<td><IMG src="images/dot_spc.gif" align="middle" border="0"></td>
<% } %>
<td align="left" width="200"><asp:hyperlink id="hlSearchOtherRegion" runat="server" CssClass="normal" NavigateUrl="none" Visible="False">Search North America Properties</asp:hyperlink></td>
<% if(hlClose.Visible){ %>
<td><IMG src="images/dot_spc.gif" align="middle" border="0"></td>
<% } %>
<td><asp:hyperlink id="hlClose" runat="server" CssClass="normal" NavigateUrl="javascript:window.close();"
Visible="False" Enabled="True">Close Window</asp:hyperlink></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td background="images/dots_horz.gif" colSpan="2"><IMG height="3" alt="" src="images/spacer.gif" width="1" border="0"></td>
</tr>
</table>