Print Page | Close Window

Layout poblems...........

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Web Design Discussion
Forum Description: Discussion on web design and development subjects.
URL: https://forums.webwiz.net/forum_posts.asp?TID=9204
Printed Date: 28 March 2026 at 1:24am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Layout poblems...........
Posted By: Semikolon
Subject: Layout poblems...........
Date Posted: 24 January 2004 at 10:19am

yo.. i have a problem with some tables and there width in IE6..

lets say i have a page with a table that is 100% wide like this:

--------------------------------------

when adding two images in another table inside that table it gets like this in SOME pages

-----------------------------------------------

even though the images is just this wide:

--------------------------

 

as said, this occurs just on some pages.. not all and i have tried to find out what it is, but without results..

this is the code im using:

header.asp:

<script language="javascript" src="includes/default_javascript.js" type="text/javascript"></script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="<% = strBgColour %>" text="<% = strTextColour %>" background="<% = strBgImage %>">
 <table cellpadding="10" border="0" width="100%">
  <tr>
   <td width="100%">
    <table <% If strPageTableBorderColor = "" Then Response.Write("border=""0""") Else Response.Write("border=""1""") %> cellpadding="5" cellspacing="0" bgcolor="<% = strPageTableBgColor %>" background="<% = strPageTableBgImage %>" style="border-collapse: collapse" bordercolor="<% = strPageTableBorderColor %>" width="100%">
     <tr>
      <td width="100%">
       <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
         <td width="100%" colspan="3">
          <table border="0" cellpadding="0" cellspacing="0" width="100%">
           <tr>
             <td width="100%">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
               <tr>
                <td width="100%" style="padding: 5px">
                 <table <% If strHeaderTableBorderColor = "" Then Response.Write("border=""0""") Else Response.Write("border=""1""") %> cellpadding="0" cellspacing="0" bgcolor="<% = strHeaderTableBgColor %>" background="<% = strHeaderTableBgImage %>" style="border-collapse: collapse" bordercolor="<% = strHeaderTableBorderColor %>" width="100%">
                  <tr>
                   <td width="100%" style="padding: 5px"><!--#include file="includes/header_inc.asp" --></td>
                  </tr>
                 </table>
                </td>
               </tr>
               <tr>
                <td width="100%" style="padding: 5px">
                 <table <% If strNavigationTableBorderColor = "" Then Response.Write("border=""0""") Else Response.Write("border=""1""") %> cellpadding="0" cellspacing="0" bgcolor="<% = strNavigationTableBgColor %>" background="<% = strNavigationTableBgImage %>" style="border-collapse: collapse" bordercolor="<% = strNavigationTableBorderColor %>" width="100%">
                  <tr>
                   <td width="100%" style="padding: 5px"><!--#include file="includes/navigation_inc.asp" --></td>
                  </tr>
                 </table>
                </td>
               </tr>
              </table>
             </td>
           </tr>
          </table>
         </td>
        </tr>
        <tr>
         <td height="100%" valign="top" style="padding: 5px">
          <table height="100%" width="100%" <% If strLeftTableBorderColor = "" Then Response.Write("border=""0""") Else Response.Write("border=""1""") %> cellpadding="10" bgcolor="<% = strLeftTableBgColor %>" background="<% = strLeftTableBgImage %>" style="border-collapse: collapse" bordercolor="<% = strLeftTableBorderColor %>">
           <tr>
             <td width="100%" height="100%" valign="top" style="padding: 5px"><!--#include file="includes/left_inc.asp" --></td>
           </tr>
          </table>
         </td>
         <td width="100%" style="padding: 5px" valign="top">
          <table <% If strMainTableBorderColor = "" Then Response.Write("border=""0""") Else Response.Write("border=""1""") %> width="100%" bgcolor="<% = strMainTableBgColor %>" background="<% = strMainTableBgImage %>" style="border-collapse: collapse" bordercolor="<% = strMainTableBorderColor %>" cellpadding="10">
           <tr>
             <td style="padding: 5px" width="100%" height="100%" valign="top">

 

 

includes/header_inc.asp
[CODE]<table width="100" border="0" cellpadding="0" cellspacing="0">
 <tr>
  <td width="100">
   <% If Not strTitleImage = "" Then %>
   <a href="<% = strWebSiteURL %>" target="_self"><img src="<% = strTitleImage %>" border="0" /></a>
   <% End If %>
  </td>
  <td width="100">
   <% If Not strTitleImage = "" Then




Replies:
Posted By: TYSON
Date Posted: 24 January 2004 at 10:37am

Have you got a link to the page(s) in question?

From what i an see you have a table width of 100 then 2 cells that equal a width of 200 combined, maybe there is a chance that the browser is getting confused.



-------------
http://www.fuo-motorsports.com/ - http://www.fuo-motorsports.com/


Posted By: Semikolon
Date Posted: 24 January 2004 at 10:49am

the table is 100% and the cells is 100pixels..

i dont have a link to it.. its only on my local test server..

 

but this is a problem only in a couple of the pages.. not all, and only in IE.. have only tried in IE6.. dont know how it is in earlier versions.. in netscape 7.1 all pages are fine..

but if i remove the image in the second cell in header_inc.asp like this, its fine in IE too

includes/header_inc.asp

Code:
<table width="100" border="0" cellpadding="0" cellspacing="0">
 <tr>
  <td width="100">
   <% If Not strTitleImage = "" Then %>
   <a href="<% = strWebSiteURL %>" target="_self"><img src="<% = strTitleImage %>" border="0" /></a>
   <% End If %>
  </td>
  <td width="100">
  </td>
 </tr>
</table>

 



Posted By: dpyers
Date Posted: 24 January 2004 at 11:46am
Take out the fixed width of at least one of the cells in a row.

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: Semikolon
Date Posted: 24 January 2004 at 1:15pm

that wouldnt work..

the weird thing is, its not the table with the images thats too wide.. its the whole damn thing!

Screenshot:

if i remove image 1 or image 2 it works fine, but when i insert images in both cells, it fails..



Posted By: Semikolon
Date Posted: 24 January 2004 at 1:16pm
btw.. when inserting an image into both cells, the whole page gets a fixed width.. its not i % of window..


Posted By: Semikolon
Date Posted: 24 January 2004 at 4:44pm

now im really confused...........

if i have a document like this:

<% @ Language=VBScript %>
<% Option Explicit %>
<!--#include file="common.asp" -->
<%
'Set the response buffer to true as we maybe redirecting and setting a cookie
Response.Buffer = True

'Make sure this page is not cached
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 2
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "No-Store"

%>
<html>
 <head>
  <title>
   <% = strWebSiteName & strNavSpacer & strTxtWelcome %>
  </title>
  <!-- #include file="header.asp" -->
  <% Call FormatTop(strImagePath & "home.gif", strWebSiteName, strWelcomeMsg) %>
  <%
  Response.Write("<table width=""498"">")
  Response.Write("<tr>")
  Response.Write("<td>hsbfsg</td>")
  Response.Write("</tr>")
  Response.Write("</table>")
  %>
  <div align="center">
   <% Call FormatBottom() %>
  </div>
<!-- #include file="footer.asp" -->

it works fine

 

but if i change the red part to this:

<% @ Language=VBScript %>
<% Option Explicit %>
<!--#include file="common.asp" -->
<%
'Set the response buffer to true as we maybe redirecting and setting a cookie
Response.Buffer = True

'Make sure this page is not cached
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 2
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "No-Store"

%>
<html>
 <head>
  <title>
   <% = strWebSiteName & strNavSpacer & strTxtWelcome %>
  </title>
  <!-- #include file="header.asp" -->
  <% Call FormatTop(strImagePath & "home.gif", strWebSiteName, strWelcomeMsg) %>
  <%
  Response.Write("<table width=""497"">")
  Response.Write("<tr>")
  Response.Write("<td>hsbfsg</td>")
  Response.Write("</tr>")
  Response.Write("</table>")
  %>
  <div align="center">
   <% Call FormatBottom() %>
  </div>
<!-- #include file="footer.asp" -->

it fails!

 





Posted By: Semikolon
Date Posted: 24 January 2004 at 4:47pm

in other words, if i create a table with fixed width above 497pixels it works.. if its in %, below 498 or not there at all, it fails..



Posted By: tester123
Date Posted: 29 January 2004 at 3:31am

Are you pretty sure of the size of images, may be image has the wider background you can not see, but it will affect the things.



Posted By: Semikolon
Date Posted: 30 January 2004 at 1:07pm

yo.. im running in 1280x1024 mode with two 450pixel images.. that shouldnt be too wide..

 

i could rewrite the tables, so maybe i should do that.. then it would work..



Posted By: pmormr
Date Posted: 30 January 2004 at 8:00pm
when all else fails... start over

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net