[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Please view my page

Posted on 2000-03-17
8
Medium Priority
?
232 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 1000 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

873 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