473,372 Members | 1,043 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

Eliminate gap between table rows?

I made my first PHP page that uses includes.
http://php.didah.com/main.php
But I can't get rid of a gap (about 5 pixels) between the table rows.

The content of each include file is one line like this:
<img src="images/nav.gif" width="100" height="600" hspace="0"
vspace="0" border="0">
No head or body tags. Just a 100 x 600 gif image.

Here's the code for the main.php page:

<html>
<head>
<title>First Include Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="600px" border="0" align="center" cellpadding="0"
cellspacing="0">
<tr>
<td colspan="2"><?php include 'header.php' ?>
</td>
</tr>
<tr>
<td><?php include 'nav.php' ?></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>This is the content area.</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><?php include 'footer.php' ?></td>
</tr>
</table>
</body>
</html>

If you look at the main page in IE there is a vertical gap between the
header, nav, and footer image. Does anyone know how to get rid of this?

Thanks for your help.
Jul 17 '05 #1
7 15978
* "Bruce W...1" <br***@noDirectEmail.com>:
I made my first PHP page that uses includes. But I can't get rid of a
gap (about 5 pixels) between the table rows. [...] If you look at the
main page in IE there is a vertical gap between the header, nav, and
footer image. Does anyone know how to get rid of this?


I realize that this isn't all that helpful, but... I looked at this page
using Mac OS X and Safari 1.0, Camino 0.7 (basically Mozilla ~1.2 for
purposes of rendering, I believe), and Internet Explorer 5.2.1, and it
looked fine. Perhaps a more cross-platform approach (such as CSS) would
work better?

--
Benjamin D. Esham { http://bdesham.net
bd*****@iname.com } AIM: bdesham 1 2 8
Esperanto, the international language -- lernu.net

Jul 17 '05 #2
Yep.

<td colspan="2"><?php include 'header.php' ?>
</td>

and here:

<td><img src="images/nav.gif" width="100" height="600" hspace="0"
vspace="0" border="0">

</td>
When you page is rendered the </td> is on a different line and your browser
is interpreting this to insert an additional space.
Make sure your </td> is on the same line as the <td> and therefore the space
is not there and it should render properly.

PWT.
"Bruce W...1" <br***@noDirectEmail.com> wrote in message
news:3F***************@noDirectEmail.com...
I made my first PHP page that uses includes.
http://php.didah.com/main.php
But I can't get rid of a gap (about 5 pixels) between the table rows.

The content of each include file is one line like this:
<img src="images/nav.gif" width="100" height="600" hspace="0"
vspace="0" border="0">
No head or body tags. Just a 100 x 600 gif image.

Here's the code for the main.php page:

<html>
<head>
<title>First Include Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="600px" border="0" align="center" cellpadding="0"
cellspacing="0">
<tr>
<td colspan="2"><?php include 'header.php' ?>
</td>
</tr>
<tr>
<td><?php include 'nav.php' ?></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>This is the content area.</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><?php include 'footer.php' ?></td>
</tr>
</table>
</body>
</html>

If you look at the main page in IE there is a vertical gap between the
header, nav, and footer image. Does anyone know how to get rid of this?

Thanks for your help.

Jul 17 '05 #3
Peter Taurins wrote:

Yep.

<td colspan="2"><?php include 'header.php' ?>
</td>

and here:

<td><img src="images/nav.gif" width="100" height="600" hspace="0"
vspace="0" border="0">

</td>

When you page is rendered the </td> is on a different line and your browser
is interpreting this to insert an additional space.
Make sure your </td> is on the same line as the <td> and therefore the space
is not there and it should render properly.

PWT.

===============================================

I'll buy your explanation. That's what's being served. But this is
getting wierd because that is not what's in my source file.

I made sure of this and uploaded it again:
http://php.didah.com/main.php

I copied the source to here below.

It does the same thing on my local PC.

This tells me that the PHP parser is inserting these spaces. Why would
it do that?

Source
-------------------------
<html>
<head>
<title>First Include Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="600px" border="0" align="center" cellpadding="0"
cellspacing="0">
<tr>
<td colspan="2"><?php include 'header.php' ?></td>
</tr>
<tr>
<td><?php include 'nav.php' ?></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>This is the content area.</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><?php include 'footer.php' ?></td>
</tr>
</table>
</body>
</html>
Jul 17 '05 #4
Benjamin Esham wrote:

* "Bruce W...1" <br***@noDirectEmail.com>:
I made my first PHP page that uses includes. But I can't get rid of a
gap (about 5 pixels) between the table rows. [...] If you look at the
main page in IE there is a vertical gap between the header, nav, and
footer image. Does anyone know how to get rid of this?


I realize that this isn't all that helpful, but... I looked at this page
using Mac OS X and Safari 1.0, Camino 0.7 (basically Mozilla ~1.2 for
purposes of rendering, I believe), and Internet Explorer 5.2.1, and it
looked fine. Perhaps a more cross-platform approach (such as CSS) would
work better?

--
Benjamin D. Esham { http://bdesham.net
bd*****@iname.com } AIM: bdesham 1 2 8
Esperanto, the international language -- lernu.net


===============================================

Thanks, that's reassuring, for everything but IE.
Jul 17 '05 #5
In your included components you actually have a few blank lines after the:

<img src="images/head.gif" width="600" height="100" vspace="0" border="0">

These blank lines are being sent to the HTML which is adding them in before
the </td> thus pushing your </td> to a new line, effetivelu inserting a
space.

Edit your included components and make sure there is NOTHING after the
closing tag.

This should then work.

HTH.
PWT.
"Bruce W...1" <br***@noDirectEmail.com> wrote in message
news:3F***************@noDirectEmail.com...
Peter Taurins wrote:

Yep.

<td colspan="2"><?php include 'header.php' ?>
</td>

and here:

<td><img src="images/nav.gif" width="100" height="600" hspace="0"
vspace="0" border="0">

</td>

When you page is rendered the </td> is on a different line and your browser is interpreting this to insert an additional space.
Make sure your </td> is on the same line as the <td> and therefore the space is not there and it should render properly.

PWT.

===============================================

I'll buy your explanation. That's what's being served. But this is
getting wierd because that is not what's in my source file.

I made sure of this and uploaded it again:
http://php.didah.com/main.php

I copied the source to here below.

It does the same thing on my local PC.

This tells me that the PHP parser is inserting these spaces. Why would
it do that?

Source
-------------------------
<html>
<head>
<title>First Include Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="600px" border="0" align="center" cellpadding="0"
cellspacing="0">
<tr>
<td colspan="2"><?php include 'header.php' ?></td>
</tr>
<tr>
<td><?php include 'nav.php' ?></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>This is the content area.</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><?php include 'footer.php' ?></td>
</tr>
</table>
</body>
</html>

Jul 17 '05 #6
In article <3F***************@noDirectEmail.com>,
"Bruce W...1" <br***@noDirectEmail.com> wrote:

: If you look at the main page in IE there is a vertical gap between the
: header, nav, and footer image. Does anyone know how to get rid of this?

On my Mac, in IE 5.1.7 (Mac OS-9), the gap isn't there, but on the same
machine, with Mozilla it shows. Someone else mentioned CSS -- you might
have to do something with that, akin to the "margin" thing you've done
in your <body> tag. You know, you can just say <body style="margin: 0">
to quickly achieve the same result.
--
Looks like more of Texas to me.
.... Arizona, where the nights are warm and the roads are straight.
Jul 17 '05 #7
Peter Taurins wrote:

In your included components you actually have a few blank lines after the:

<img src="images/head.gif" width="600" height="100" vspace="0" border="0">

These blank lines are being sent to the HTML which is adding them in before
the </td> thus pushing your </td> to a new line, effetivelu inserting a
space.

Edit your included components and make sure there is NOTHING after the
closing tag.

This should then work.

HTH.
PWT.

================================================== =====

By jove you've got it. I appreciate your help, I would have never have
guessed this. Thanks.
Jul 17 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Julio Allegue | last post by:
I am working with SQL 8.00. I have the following tables TABLE ClientInfo CheckNum Account Name Addr1 City State Zip...
4
by: jeffsal | last post by:
I am using sorttable.js to sort a table which works fine which allows a user to sort the table by clicking on the column header. Is there some code I could add to the page (onload or something) to...
7
by: Richard Yardley | last post by:
I have a mailing label report and would like to remove the space taken up by rows with no info (move the other rows up). I am a beginner using MS Access 2000 and would appreciate any help. ...
1
by: VM | last post by:
In the Windows datagrid (if read-only is false), a user can add another row to the grid if the Tab key is pressed when the cursor's in the last row and last column. Is there any way to eliminate...
11
by: Michael Mayo | last post by:
I have a simple html page that contains an image in a single table cell, surrounded by a border: <http://www.softrains.com/lc/test.html>. I would like to eliminate the space between the table...
3
by: italia | last post by:
I have a database with 2 columns and more than million rows. The first column is the id Example of the data (2 columns)- 04731 CRM 04731 CRM 04731 CRM 04731 RVB 04731 RVB
10
by: ranjitkumar | last post by:
Hi, Do anyone know a query for the following senario, I have a table in which i have multiple rows with the same entry. I want to keep only one copy of such rows. How to write a query to delete...
7
by: Kamal | last post by:
Hello all, I have a very simple html table with collapsible rows and sorting capabilities. The collapsible row is hidden with css rule (display:none). When one clicks in the left of the...
5
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.