?
Solved

scrollbar issues

Posted on 2009-02-17
5
Medium Priority
?
402 Views
Last Modified: 2012-05-06
Hello all,

I'm facing some scrollbar issues in my application. I think it has something to do with the alignment issues. I'm posting the code below of my master page. Also adding the screenshot of how it looks.

Any kind of help would be appreciated.
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Main.master.cs" Inherits="Main" %>
<!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>Welcome</title>
  <link rel="stylesheet" type="text/css" href="CSS/style.css">
  <link rel="stylesheet" type="text/css" href="CSS/style.css">
</head>
<body topmargin="0">
  <form id="form1" runat="server">
    <table align="center" border="0" cellpadding="0" cellspacing="0" width="990" bordercolor="Aqua"
       height="679">
      <tr>
        <td width="10" background="../images/left_back.jpg">
      </td>
        <td align="center" valign="top" width="972">
          <table align="center" border="0" cellpadding="0" cellspacing="0" bordercolor="Black"
            width="970">
            <tr>
              <td width="970" height="135" align="center" valign="top">
                <img src="../images/top.jpg"></td>
            </tr>
          </table>
          <table cellpadding="0" cellspacing="0" border="0" bordercolor="red">
            <tr valign="top">
              <td align="left" valign="top">
                <div id="navbar">
                 
                    <asp:Menu ID="MainMenu" runat="server" StaticMenuItemStyle-Height="20" StaticHoverStyle-Width=""
                      StaticMenuItemStyle-BackColor="#669ACC" CssClass="Header" DynamicMenuStyle-BackColor="#ADD8E6"
                      DynamicSelectedStyle-ForeColor="#ffffff" BackColor="#ffffff" Orientation="Horizontal"
                      OnMenuItemClick="MainMenu_MenuItemClick" DynamicMenuItemStyle-ForeColor="#0B388D"
                      StaticHoverStyle-Font-Underline="true" DynamicMenuStyle-CssClass="Header" ForeColor="#ffffff"
                      DynamicMenuItemStyle-Height="20" DynamicMenuItemStyle-Width="160" StaticEnableDefaultPopOutImage="false"
                      Width="968px"  StaticMenuItemStyle-HorizontalPadding="10px"  DynamicMenuItemStyle-HorizontalPadding="10px"
                      DynamicHoverStyle-Font-Underline="true" DynamicHoverStyle-ForeColor="white" StaticHoverStyle-ForeColor="white">
                    </asp:Menu>
                  <table cellpadding="0" cellspacing="0" border="0">
                  <tr>
                  <td  height="8"></td>
                  </tr>
                  </table>
                  <table align="center" border="0" cellpadding="0" cellspacing="0" bordercolor="Black"
                    width="900" background="../images/table_back.gif" height="30">
                    <tr>
                      <td width="28" height="28">
                        <asp:Label runat="server" ID="lblUnit" Text=""><img src="../images/unit.jpg" alt="Unit"></asp:Label>
                      </td>
                      <td class="Heading2">
                        &nbsp;<asp:Label runat="server" ID="lblUnitValue" CssClass="Heading2" Text="DEP"></asp:Label></td>
                      <td width="28" height="28">
                        <asp:Label ID="LblContractor" runat="server" Text="" Visible="False"><img src="../images/contractor.jpg" alt="Contractor"></asp:Label>
                      </td>
                      <td class="Heading2">
                        <asp:Label ID="LblContractorValue" CssClass="Heading2" runat="server" Text="Manager"
                          Visible="False"></asp:Label></td>
                      <td width="28" height="28">
                        <asp:Label runat="server" ID="lblUserLevel" Text=""><img src="../images/userlevel.gif" alt="User Level"></asp:Label>
                      </td>
                      <td class="Heading2">
                        &nbsp;<asp:Label runat="server" ID="lblUserLevelValue" CssClass="Heading2" Text="Manager"></asp:Label></td>
                      <td width="28" height="28">
                        <asp:Label runat="server" ID="lblUser" Text=""><img src="../images/user.jpg" alt="User"></asp:Label>
                      </td>
                      <td class="Heading2">
                        &nbsp;<asp:Label runat="server" ID="lblUserValue" CssClass="Heading2" Text="Purna Movva"></asp:Label></td>
                      <td width="23" height="24">
                        <asp:Label runat="server" ID="lblDate" Text=""><img src="../images/calander.jpg" alt="Today's Date"></asp:Label>
                      </td>
                      <td class="Heading2">
                        &nbsp;<asp:Label runat="server" ID="lbldateValue" CssClass="Heading2" Text="October 22, 2008"></asp:Label></td>
                      <td width="23" height="24">
                        <asp:Label runat="server" ID="lblMode" Text=""><img src="../images/bulb.jpg" alt="Mode"></asp:Label>
                      </td>
                      <td class="Heading2">
                        &nbsp;<asp:Label runat="server" ID="lblStatus" CssClass="Heading2" Text="Online"></asp:Label></td>
                      <td width="23" height="24">
                        <asp:Label runat="server" ID="lblVersion" Text=""><img src="../images/version.gif" alt="Version"></asp:Label>
                      </td>
                      <td class="Heading2">
                        &nbsp;<asp:Label runat="server" ID="lblVersionValue" CssClass="Heading2" Text="1.00"></asp:Label></td>
                    </tr>
                  </table>
                  <asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">
                  </asp:ContentPlaceHolder>
                </div>
                <!-- navbar -->
              </td>
            </tr>
          </table>
         <%-- <table border="0" align="center" cellpadding="0" cellspacing="0" width="950">
            <tr>
              <td bgcolor="#ADD9E6" height="2">
              </td>
            </tr>
            <tr>
              <td height="5" valign="baseline" align="left">
                <font color="#000000" size="1" face="Verdana">
                  <br>
                  &copy;&nbsp;Copyright 2008 - The City of New York</font></td>
            </tr>
          </table>--%>
        </td>
        <td width="10" background="../images/right_back.jpg">
      </td>
      </tr>
    </table>
    <table align="center" border="0" cellpadding="0" cellspacing="0" width="1002" bordercolor="Aqua"
    height="88" background="../images/bottom.jpg">
    <tr>
      <td>
       </td>
    </tr>
  </table>
  </form>
</body>
</html>

Open in new window

scrollbar.JPG
0
Comment
Question by:AvinashKN
  • 2
  • 2
5 Comments
 
LVL 12

Expert Comment

by:techExtreme
ID: 23662654
So like you want to remove the horizontal scrollbar or? please specify.  If this is the case, try setting the overall width from 990px to something small like 950px  of your main table.
0
 

Author Comment

by:AvinashKN
ID: 23662667
I want to remove the vertical scrollbar. Horizontal is fine.
0
 

Author Comment

by:AvinashKN
ID: 23662682
I've also tried adjusting every height property possible without any luck.
0
 
LVL 12

Accepted Solution

by:
techExtreme earned 750 total points
ID: 23662691
Well your content exceeds the viewing area hence the scrollbar.
Incase you want to avoid this, first step is to reduce your overall height of main table.
Yet, you have to place everything in a div and make its style display to block and give it fixed height and width and overflow to hidden or something.
Then you won't  have the vertical scroll.
0
 
LVL 12

Assisted Solution

by:CB_Thirumalai
CB_Thirumalai earned 750 total points
ID: 23666240
In the body tag use this
scroll="no"
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Screencast - Getting to Know the Pipeline
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month14 days, 17 hours left to enroll

839 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