Solved

Please view my page

Posted on 2000-03-17
8
179 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

by:wimkerk
Comment Utility
Adjusted points from 175 to 250
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

Author Comment

by:wimkerk
Comment Utility
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
Comment Utility
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
Comment Utility
It is totally clear to me know. Thanks for the lesson Josh :)
0
 
LVL 8

Expert Comment

by:jbirk
Comment Utility
Sure, glad to help:)
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

771 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now