Solved

Please view my page

Posted on 2000-03-17
8
190 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
 

Author Comment

by:wimkerk
ID: 2634513
Adjusted points from 175 to 250
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows Tool to Build Android and iOS App 3 53
HTML CSS 7 38
Footer at the bottom of the page not centered 5 28
insert text field data into html script 13 22
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

911 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

16 Experts available now in Live!

Get 1:1 Help Now