Solved

Please view my page

Posted on 2000-03-17
8
201 Views
Last Modified: 2010-04-09
Hi,

I have got some trouble with my table. Please view
my page at  http://nl.internations.net/wimkerk/test.html

Thanks in advance,
Wim
0
Comment
Question by:wimkerk
  • 4
  • 4
8 Comments
 
LVL 8

Accepted Solution

by:
jbirk earned 250 total points
ID: 2629855
I've cleaned it up a bit.  There were some minor errors in the table structure (wrong number of columns per row), but the major problem was that the first row was in the same table as the banner, and the bottom row was in it's own table and netscape put padding in between the tables by default and IE didn't...  If you explicitly set the padding and spacing this isn't a problem, but in this case I think it makes more sense to join them into the same table...  Here's the code:

<table width=471 cellpadding=1 cellspacing=0 border=0 valign=top>
<form>
  <tr><td width=300 valign=top bgcolor=orange>
    <select>
    <option value="">Go
    <option value="">Go2
    </select>
    &nbsp; Some text here
  </td>
</form>
<form>
  <td width=170 bgcolor=blue>
    <select>
    <option value="">Go4
    <option value="">Go5
    </select>
  </td></tr>
</form>
  <tr><td colspan=2 align=left>
    <img src="banner.gif">
  </td></tr>
  <tr><td bgcolor="black" width="471" valign=top colspan=2>
    <table width="100%" border="0" cellpadding="1" cellspacing="0">
      <tr><td bgcolor="lightblue"  align="left">
        <font size=-2 face=Arial>&nbsp; <a href="link.html">link</a> | <a href="link2.html">Link2</a> |
      </td><td bgcolor="lightblue" align="right">
        <font size=-2 face=Arial><a href="link3.html">Link3</a>&nbsp;</font>
      </td></tr>
    </table>
  </td></tr>
</table>


It works for me in both browsers.

-Josh
0
 

Author Comment

by:wimkerk
ID: 2630375
Thanks Josh, I understand what I did wrong now. One thing, the first two links are in the center of bottom row, while the third is at the bottom. This also makes the row higher than my original one.
I tried adding valign="center" but this didn't help.
0
 
LVL 8

Expert Comment

by:jbirk
ID: 2630661
The introduction of white space will cause that.  Here is a new version the previous modificaiton without the white space:

<table width=471 cellpadding=1 cellspacing=0 border=0 valign=top>
<form>
  <tr><td width=300 valign=top bgcolor=orange><select>
    <option value="">Go
    <option value="">Go2
    </select>
    &nbsp; Some text here</td>
</form>
<form>
  <td width=170 bgcolor=blue><select>
    <option value="">Go4
    <option value="">Go5
    </select></td></tr>
</form>
  <tr><td colspan=2 align=left><img src="banner.gif"></td></tr>
  <tr><td bgcolor="black" width="471" valign=top colspan=2><table width="100%" border="0" cellpadding="1" cellspacing="0">
      <tr><td bgcolor="lightblue"  align="left"><font size=-2 face=Arial>&nbsp; <a href="link.html">link</a> | <a href="link2.html">Link2</a> |</td>
            <td bgcolor="lightblue" align="right"><font size=-2 face=Arial><a href="link3.html">Link3</a>&nbsp;</font></td>
      </tr>
   </table></td></tr>
</table>


When there is white space between images/ text/ form elements/ etc..  and opening and closing <TD> tags, it tends to introduce extra space in the table cell.  So removing this extra white space should resolve these issues.  Sorry about that...

-Josh
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Author Comment

by:wimkerk
ID: 2634513
Adjusted points from 175 to 250
0
 

Author Comment

by:wimkerk
ID: 2634514
Thanks Josh.
Strange that extra space is added the way you describe. This is really something you just know or don't.

One last question (have added 75 points). In your  first answer you said :

"..but the major problem was that the first row was in the same table as the banner, and the bottom row was in it's own table and netscape put padding in between the tables by default and IE didn't...  If you EXPLICITLY SET THE PADDING AND SPACING  this isn't a problem, but in this case I think it makes more sense to join them into the same table,"

I thought I already set the padding and spacing in my original table:
cellpadding=0 cellspacing=0

Could you show me what the original page should look like if you alter it by "explicitly setting the padding and spacing,"?  Just want to learn how to do it in different ways.

Thanks,
Wim
0
 
LVL 8

Expert Comment

by:jbirk
ID: 2634616
Sure!  You originally had this as the start of the second table (third row):
<table width=471 valign=top>
And since no cellpadding/spacing/border was specified for this tag it added in the default spacing.  Even though you had specified these for the nested table, it didn't affect the parent table.  So the new code this way looks like this:

<table width=471 cellpadding=1 cellspacing=0 border=0 valign=top>
<form>
  <tr><td width=300 valign=top bgcolor=orange><select>
    <option value="">Go
    <option value="">Go2
    </select>
    &nbsp; Some text here</td>
</form>
<form>
  <td width=170 bgcolor=blue><select>
    <option value="">Go4
    <option value="">Go5
    </select></td></tr>
</form>
  <tr><td colspan=2 align=left><img src="banner.gif"></td></tr>
</TABLE>
<TABLE cellpadding="1" cellspacing="0" border="0">
  <tr><td bgcolor="black" width="471" valign=top><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr><td bgcolor="lightblue"  align="left"><font size=-2 face=Arial>&nbsp; <a href="link.html">link</a> | <a href="link2.html">Link2</a> |</td>
            <td bgcolor="lightblue" align="right"><font size=-2 face=Arial><a href="link3.html">Link3</a>&nbsp;</font></td>
      </tr>
   </table></td></tr>
</table>


Note that the width doesn't have to be set for the parent yable since it's nested table specifies that it just figures out it's width.
The cellpadding="1" is to ensure the effect of the black border around the third row.

-Josh
0
 

Author Comment

by:wimkerk
ID: 2634711
It is totally clear to me know. Thanks for the lesson Josh :)
0
 
LVL 8

Expert Comment

by:jbirk
ID: 2634881
Sure, glad to help:)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

825 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