Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Aug 2003
    Location
    Central California
    Posts
    1
    Member #
    2688
    Well, this has become frustrating, but I am sure it's something simple.

    I have created an index.shtml which has 2 "include file". One is my top banner(banner.html), and the second is my left/nav (leftNav.html). When I edit my index.shtml in DreamWeaver, they look right (leftNav.html is all the way to the left), however, when I view them (IE6), my left nav is indented (about the distant as my first row in the banner.html).

    index.shtml
    -----------------------------------------
    <HTML>
    <HEAD>
    <TITLE>Welcome to DKJM</TITLE>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
    <link href="css.css" rel="stylesheet" type="text/css">
    </HEAD>
    <BODY BGCOLOR=#FFFFFF background="images/bg.jpg" text="#FFFFFF" link="#990000" vlink="#990000" alink="#0000FF" LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
    <div align="center"><!--#include file="includes/banner.html" -->
    <table width="790" border="0" cellspacing="0" cellpadding="0">
    <td width="136" valign="top"><!--#include file="includes/leftNav.html" --> </td>
    <td width="654" valign="top"> <div align="left"><br>
    </div></td>
    </tr>
    </table>
    </div>
    </BODY>
    </HTML>
    -------------------------------------------------------
    If I pull the include files (banner and leftNav) up by themself, they allign left. If I change the second include file from leftNav.html to banner.html, they both allign left.

    The site can be viewed HERE

    the 3 files are:

    index.shtml
    includes\banner.html
    includes\leftNav.html

    Any help would be greatly appreciated

    Thanks
    -David

    PS, I just realized that if my IE is not maximized, it works correctly. As I drag my window larger, the leftNav starts to move right

  2.  

  3. #2
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    This is because you've got your table set to a width of 790px and center aligned. When the window has a width smaller than 790px a horizontal scrollbar appears and the left hand side of the table is pushed to the left of the window.

    When the window is larger than 790px the table centers and leaves a gap either at either side. ie, if the window is 810px wide then there will be a gap of 10px either side of the table. As you navigation is in the left hand column of the table it will be displaced right by those 10px. (This error becomes greater as the window becomes larger).

    To solve this you need to either left align your page, in which case any spacing around the table will appear at the right only, or change the table width to 100%. Then it will always fill the window and always be flush on the left.

    I've also noticed that your table width for the banner is 950px. To tables that are different widths will never align properly if they are aligned center. You could try playing with making them the same size.

    You've got quite a few erroneous widths on the pages:

    <TD width="100" rowspan="2"><div align="left">

    should actually be:

    <TD width="100" rowspan="2" align="left">

  4. #3
    Senior Member skrlin's Avatar
    Join Date
    Apr 2003
    Location
    Illinois
    Posts
    562
    Member #
    1063
    As with what mossoi said, you need to change the width of the second table from 790 to 950 to match your first table. I saved the page to my desktop and tried this, and it worked at my res of 1280x1024
    - Brian

  5. #4
    Senior Member skrlin's Avatar
    Join Date
    Apr 2003
    Location
    Illinois
    Posts
    562
    Member #
    1063
    Or what you could do is change the first table to match the second one at 790, which would make more sense since you would still be taking into account people with 800x600 resolutions. That first table is going to cause a huge horizontal scroll at 800x600 resolutions. So consider that as well.
    - Brian

  6. #5
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    One other thing, if you've set the table width to 790px to allow for 800 x 600 browsers it still a bit too big. I limit my pages to 769px. Don't forget that 800px is the maximum width of the screen and doesn't take into account scroll bars and other window borders.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 12:01 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com