We help IT Professionals succeed at work.

scrollbar issues

AvinashKN
AvinashKN asked
on
Medium Priority
412 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
Comment
Watch Question

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.

Author

Commented:
I want to remove the vertical scrollbar. Horizontal is fine.

Author

Commented:
I've also tried adjusting every height property possible without any luck.
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.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
In the body tag use this
scroll="no"
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.