Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Layout poblems...........
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic ClosedLayout poblems...........

 Post Reply Post Reply Page  12>
Author
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Direct Link To This Post Topic: Layout poblems...........
    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

Back to Top
TYSON View Drop Down
Groupie
Groupie


Joined: 18 August 2002
Location: Australia
Status: Offline
Points: 142
Direct Link To This Post 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.

Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Direct Link To This Post 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>

 

Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Direct Link To This Post 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.
Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Direct Link To This Post 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..

Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Direct Link To This Post 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..
Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Direct Link To This Post 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!

 



Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Direct Link To This Post 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..

Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.